1849834 Members
2620 Online
104044 Solutions
New Discussion

Re: disk space problems

 
SOLVED
Go to solution
johnson
Occasional Contributor

disk space problems

HI:

We have an HP UX 9000 machine (10.20 OS). We have our root and /usr directories on a single disk which is now 97% full. Our other disk (/users) is also 96% full. Besides getting a new diskdrive for the / and /usr filesystem, is there anyway to trim or remove unused system files from / or /usr? I have already used the SAM program to trim all the system log files and and search for unused filesets (it did not find any).

If getting a larger disk for the / and /usr dir. is the only solution. Do you recommend getting a new disk drive from HP or can we get it cheaper from some other vendor (seagate?). Finally, is the process of installing and cloning (?) the root and /usr filesystems a job for novice (such as myself?).

Thanks so much for any advice.
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor

Re: disk space problems

Wayn:

One option you may still have is to create additional mount points both for / and for /usr. For instance, if you have a large amount of space tied up in /usr/local then you could move /usr/local files to another disk and create a separate mount point from there.

As to the price of new disk, there are many third-party vars that stock disk for HP servers. Where ever you get a good deal is fine.

The IGNITE product is ideal for "cloning" your root disk; allowing you to expand the logical volumes as you see fit. Do a search on this forum to find a wealth of threads on Ignite and Ignite's make_recovery.

For IGNITE software and documentation go to:

http://www.software.hp.com/products/IUX and
http://www.software.hp.com/products/IUX/docs.html

..JRF...



Bill Hassell
Honored Contributor
Solution

Re: disk space problems

A good starting point is to analyze what is using /usr. Use the directory usage command (du) to summarize this as in:

du -kx /usr | sort -rn | more

The largest directories will be shown at the top. If there is a significantly larger directory (perhaps 3 or 4 times larger than the remaining directories, may be a candidate to be moved to another disk mountpoint.

However, be sure that you have used all your current disk space. Type the command:

vgdisplay | grep Free

If there are Free extents then they can be added to /usr as a stopgap measure. If not, time to get another disk (they are very inexpensive considering the cost of labor needed to manage disk space and shuffle things around to other disks or off to tape.

As far as maintenance, /usr should have mostly applications and should not grow except when adding more apps. Same with /opt. If most of your disk areas are full, then adding another physical disk is mandatory.

Managing /home is a different, often political problem. Many users simply won't take the time to manage their disk space. You can use the same du command to look at the (ab)users of that area as in:

du -kxs /home | sort -rn | more

which will give a 1-liner for each user's total disk space. Usually, just a few directories are very large. Then fine tune the process by looking at each directory as in:

du -kx /home/user123 | sort -rn

and when you find a really large directory, sort the directory by size with:

ll /home/user123/somedir | sort -rnk5 | more

and you'll see the big files at the top. (Resist the temptation to search for 'big' files - while there may be some, there can also be a *massive* directory with lots of little files, perhaps thousands, due to a mistake). Files with obvious PC externsions like .EXE or .ZIP, or files with dubious value to your company like .JPG or .MP3 are
candidates for a discussion with their managers.

Ignite/UX (free download from software.hp.com) is a great way to reorganize your disk without re-installing from scratch.


Bill Hassell, sysadmin