Operating System - HP-UX
1832241 Members
2848 Online
110041 Solutions
New Discussion

What can I do if root filesystem full?

 
SOLVED
Go to solution
Ryan Ma
Frequent Advisor

What can I do if root filesystem full?

How to recover if root filesystem full?

Thx.

HP-UX Test B.11.00 U 9000/800 (td)

login: root
Password:
Last successful login for root: Tue May 7 12:26:50 EAT-8 2002 on pts/tc
Last unsuccessful login for root: Thu Apr 18 10:29:46 EAT-8 2002 on pts/tb


vxfs: mesg 001: vx_nospace - /dev/root file system full (1 block extent)

Wait for login exit: ..
18 REPLIES 18
Peter Kloetgen
Esteemed Contributor

Re: What can I do if root filesystem full?

Hi Ryan,

a typical error is, that someone tried to do a backup and used a wrong device file name! ( /dev/rmto for example ) this would write the backup into root file system, which could get full then. First of all, check this out. After that you could use find- command to get rid of anything, which is no longer needed. You could search for files of a specified size, age, or user, and move them, or delete them. Do a backup, if they are needed!

find /path desired_files -exec mv /path {} \;

more information: man find

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
G. Vrijhoeven
Honored Contributor

Re: What can I do if root filesystem full?

Hi,

Look for core files, tar, gz files and log files, but check them out before removing them! you do not want the same thing to happen again!

Gideon

Bill McNAMARA_1
Honored Contributor

Re: What can I do if root filesystem full?

du -s /*

to find out the big ones.

If you're having an application recurringly dump or misbehave:
ln -s /dev/null core

Later,
Bill
It works for me (tm)
T G Manikandan
Honored Contributor
Solution

Re: What can I do if root filesystem full?

Bill McNAMARA_1
Honored Contributor

Re: What can I do if root filesystem full?

one for the /dev/

# du -s /dev/* | sort -n | grep -v 0
2 /dev/diag
4 /dev/pts
4 /dev/pty
4 /dev/ptym

Later,
Bill
It works for me (tm)
Ryan Ma
Frequent Advisor

Re: What can I do if root filesystem full?

Hi all,

Since I cannot telnet, rlogin, ftp, console login, I think I can just go to Guardian Service Processor and reset to single user mode before I can do anything.

Thx.
T G Manikandan
Honored Contributor

Re: What can I do if root filesystem full?

Yes do a reset but
when you boot again interrupt the boot process interact with IPL
then boot into single user mode and do the needful.

IPL>hpux -is

THanks
G Manikandan
T G Manikandan
Honored Contributor

Re: What can I do if root filesystem full?

Hello,
Please try logging in as a normal user and do a
su to root user.
Please check this out.

Thanks
Trond Haugen
Honored Contributor

Re: What can I do if root filesystem full?

Yes, you'll have to boot in single user to "get inn". You will then have to activate vg00 (vgchange -a y vg00) and run 'mount -a' (non-vg00 filesystems will not mount) before you can use most of the commands.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
David Burgess
Esteemed Contributor

Re: What can I do if root filesystem full?

Just a thought. Can you ftp to the system and then look for the large file? Check /dev first. ls -la will find it. Use delete to remove it.

HTH

Dave.
harry d brown jr
Honored Contributor

Re: What can I do if root filesystem full?

Two quick clean ups:

find /dev -type f -exec rm -i {} \;

find /tmp -type f -size +100000c -exec rm -i {} \;


live free or die
harry
Live Free or Die
Sukant Naik
Trusted Contributor

Re: What can I do if root filesystem full?

Hi Ryan,

One more suggestion. Can you send us info about whether /var, /usr, /opt directories have been created in the / filesystem.

If you have for your /var directory in the root filesystem, then check for /var/adm/crash directory. It will contain lots of crash dumps which you can remove.

-Sukant
Who dares he wins
Pete Randall
Outstanding Contributor

Re: What can I do if root filesystem full?

Ryan,

One thing that got me years ago was a file system that had been unmounted, allowing output that should have gone into the file system to go into the root file system instead. While you're in single user mode, do a "ls -l" for each of the file system mount points. If there's anything there (while the file system is not mounted) it's filling up your root file system.

Good luck,
Pete

Pete
Victor_5
Trusted Contributor

Re: What can I do if root filesystem full?

Hi Ryan:

There are tons of posts talking about this problem in this forum, if I were you, the first thing I need to do is search, key in keyword "root full", you will get a lot of posts which will be useful for you. Good luck!

MANOJ SRIVASTAVA
Honored Contributor

Re: What can I do if root filesystem full?

Hi Ryan

Whenever it happens to me , ans since i cannot login so cannot run a find ,etc so I ftp to the system , then immediatley go to /etc and delete wtmp , or /var/adm and delete OLD syslog as these files free up some blocks , then I doa normal login and procedd with cleaning.


Manoj Srivastava
jd-gt
Occasional Advisor

Re: What can I do if root filesystem full?

I just did this very thing on Sunday. I fortunately had a telnet session established and did indeed find a core file as the culprit.

Please be advised, doing a find for large files and removing them may not be the most prudent act. You'll want to be sure the file that is deleted is the file you really want to delete.

Also, as you may have discovered by now, if you do not have an established telnet connection you can not create a new one when the root file system is full. On the same line, you cannot su - to root for the same reason.

One person had the perfect answer in my book. reset, interrupt the startup, boot up in single user mode, mount /dev/vg00, and mount -a. Start the search.

Good luck!
Roger Baptiste
Honored Contributor

Re: What can I do if root filesystem full?

hi,

Once i ran into this problem and was able to free space through Openview server ;-) Openview has options for sending commands through it's socket to its clients.

Another option worth a try would be to do remsh from other boxes. Ofcourse, this is assuming that you have remsh or openview setup
for the system.

HTh
Take it easy.
Ryan Ma
Frequent Advisor

Re: What can I do if root filesystem full?

Thanks for all of your suggestion.

Let me summarize what I have done.
1. telnet / login as ordinary user and root (fail)
2. console / login as root (fail)
3. ftp / login as root (fail)

Here is what I haven't try
1. rlogin (not authorize to use)
2. remsh (not authorize to use)

Thanks G Manikandan that the first one gave me the answer (Reset the system).
Thanks Pete Randall,
Sorry Victor, sorry for making a new post rather than searching first.


Sukant Naik, my system is installed in default config ( /, /var, /tmp, /home, /stand, /usr, /opt )