Operating System - HP-UX
1833776 Members
2012 Online
110063 Solutions
New Discussion

HP-UX FREEING SPACE FROM /

 
SOLVED
Go to solution

HP-UX FREEING SPACE FROM /

Is there a tool I can use to free space from /? I need to increase free space in order to install a bundle.
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: HP-UX FREEING SPACE FROM /

Hi:

The sane, guaranteed way to increase the root ("/") filesystem is to re-Ignite your server form a make_tape_recovery tape.

That said, you should not need any appreciable free space in '/' to install patches or products if your configuration uses standard HP-UX logical volumes.

If '/' is short of space, you probably have files other than those that belong in directory's like '/etc', '/dev', '/sbin' and '/stand'. Perhaps you have multiple copies of kernels. Perhaps you have multiple backup copies of configuration files in '/etc'.

Look in '/dev' for non-special files. A common mistake when doing a backup is to specify '/dev/rmt/om' when you should use '/dev/rmt/0m'. This leaves a (usually large) non-special file in '/dev' which was supposed to go to tape!

Look for the largest directories in '/' first with:

# du -xk / | sort -k1nr

Having determined which directory(s) is using the most space, look for files that can be removed.

Regards!

...JRF...
Steven E. Protter
Exalted Contributor

Re: HP-UX FREEING SPACE FROM /

Shalom,

There should not be any files on /
cd /
du -k | sort -rn

You may need to pipe to more and grep -v mounted filesystems.

Also note the old hidden file trick:

mkdir /steve
copy 50 MB

mount a fs on it

The space is taken and the files are invisible.

I've seen this happen with /var. To fix it you need to go to single user mode.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Fabian Briseño
Esteemed Contributor

Re: HP-UX FREEING SPACE FROM /

Hello Victor.

/ root should not be used for installing programs, because if root fills up your whole system will go down. instaead use var. that being said if you need to increase / size you could do it via ignite, or im unsure if you could do it in single user mode.

Knowledge is power.

Re: HP-UX FREEING SPACE FROM /

Thanks to all.

The previous system administrator installed NSR (networker) on /, and is one of the directories that shouldn't be there. swremove says it can't be relocated, but I'm pretty sure we're not using it. I'll uninstall it.

Actually, what I need to do is to install a QualityPack, but swinstall says there is not enough free space in / and /usr.

Someone mentioned a tool to remove old patches and the like, have you heard of it?

Regards.
Paul Sperry
Honored Contributor
Solution

Re: HP-UX FREEING SPACE FROM /

The 'cleanup' tool is used to commit patches while preserving a set level
of rollback.

Do a man cleanup.

cleanup is in /usr/sbin
James R. Ferguson
Acclaimed Contributor

Re: HP-UX FREEING SPACE FROM /

Hi (again) Victor:

To remove old patches, use 'cleanup'. This will not change the root filesystem utilization, though. The Installed Product Database resides in '/var'.

That said, if you are using Legato Networker, you most certainly can symbolic link '/nsr' to '/var/nsr'. I do just to keep the "stuff" out of my root directory.

Regards!

...JRF...