Operating System - HP-UX
1748211 Members
4511 Online
108759 Solutions
New Discussion юеВ

Re: extend /opt on root disk

 
SOLVED
Go to solution

extend /opt on root disk

Is there a way to extend /opt without shutting the system down to un-mount the filesystem? I am at capacity (100%).
5 REPLIES 5
Dan Hetzel
Honored Contributor

Re: extend /opt on root disk

Hi Rebecca,

Unless you have Online JFS installed, you'll have to umount the filesystem to be able to increase the logical volume (and filesystem) size.


You don't need to shutdown your system:
Have a look with fuser at the process(es) having a file open on the /opt filesystem

Terminating the processes reported by 'fuser /opt' will allow you to umount the filesystem, increase the size, and mount it back.

Best regards,

Dan

Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
MARTINACHE
Respected Contributor

Re: extend /opt on root disk

Hi,

Sometimes, it's very hard to umount a FS in VG00.

The only solution is rebooting in single user mode.

Regards,

Patrice.
Patrice MARTINACHE
Michael Lampi
Trusted Contributor

Re: extend /opt on root disk

Another solution is to create a new /opt on some other disk, copy all the files over to it from your root disk, unmount the new /opt, unmount the original /opt, and then permanently mount the new /opt.

If you find that some process has one or more files locked on the old /opt, then the fuser command can be used to track them down to be killed.

Of course, you will need to change your fstab so that the new /opt is mounted when the system is rebooted.
A journey of 1000 steps ends in a mile.
Michael Lampi
Trusted Contributor

Re: extend /opt on root disk

Yet another solution is to move some of the directories in /opt to some other volume with more space, and use links from the old /opt to the new location. This will be quite transparent to applications.
A journey of 1000 steps ends in a mile.
Bill Hassell
Honored Contributor
Solution

Re: extend /opt on root disk

fuser will miss about 2/3 of the processes that have files open on a given mount point. Once you've gotten rid of the processes on the mount point, change fuser to point to the logical volume (/dev/vg00/lvol-whatever) and again, kill the associated processes.

That should get most of themso you can unmount the filesystem (no more device busy messages). If this doesn't get it unmounted, get a free program called lsof to completely identify the open processes on /opt.

Be sure to check if you have any space left on the volume group with the vgdisplay command (Free PE).


Bill Hassell, sysadmin