Operating System - HP-UX
1829913 Members
3226 Online
109993 Solutions
New Discussion

Increase the /usr logical volume size

 
Thomas Varghese_2
Occasional Contributor

Increase the /usr logical volume size

We are using HP UX 10.2. I would like to install some patches, but I don't have
enough space on the "/usr" logical volume.

I tried increasing the size thru SAM. But it asked me to umount it first. But
When I tried to umount the "/usr" volume, it said that it cannot umount /usr
and the "Device is busy".

Can any of you suggest me how to increase the volume size of /usr

Thanks in advance

regards
Thomas Varghese
8 REPLIES 8
Rafael Gutierrez_3
Occasional Advisor

Re: Increase the /usr logical volume size

The /usr file system cannot be unmounted in run level > S. You must bring down
the system to run level S (single user mode) and increase logical volume with
these commands:

1-. Identify /usr location in output of command bdf
2-. Transition to single user mode: shutdown 0
3-. Run level S (/usr in /dev/vg00/lvol7):
# cd /
# umount /usr
# lvextend -L /dev/vg00/lvol7
# extendfs /dev/vg00/rlvol7 (Note "rlvol" device)
# mount /usr
# bdf (to confirm new size)
# reboot (or init

It's all.

Rafael GZ.
Anthony Goonetilleke_1
Regular Advisor

Re: Increase the /usr logical volume size

Alternatively if it is a critical machine you may want to get mirrordisk/UX
which allows logical volume increases on the fly without unmounting/rebooting
etc.
Dan Hull
Regular Advisor

Re: Increase the /usr logical volume size

Anthony, I feel like I should slap your wrist :) I assume you meant to
recommend the product "OnlineJFS" rather than "MirrorDisk/UX" for modifying
lvol size on the fly.
Arunanand Addepalli
New Member

Re: Increase the /usr logical volume size

On some non-BSD based machines you can use the
command "umount -k" to force the system to drop a
busy device.

# umount -k /hosts/foo
OR
One can use "fuser" command with -k option to kill all processes connected to
that FS.
THEN
Try Online JFS to achieve ur target.
Chan On Kei
New Member

Re: Increase the /usr logical volume size

You need to go down to single user mode in order to unmount /usr
Angela
NAJMUS
Advisor

Re: Increase the /usr logical volume size

you can not increase the /usr on online mode unless if you JFSonline installed.
but you can do it in single user mode as follow :
from isl
isl>hpux -is
#mountall
#umount /usr
#lvextend -L size /dev/vg00/lvol6
#extendfs /dev/vg00/rlvol6
#mount /usr
#bdf to verify the new size
#shutdown -r 0

regards
Rick Garland
Honored Contributor

Re: Increase the /usr logical volume size

The bottom line -

reboot to single user mode and do the lvextend/extendfs commands from the single user mode -or-

If online JFS is installed, can do on the fly.

If going to single user mode, do the reboot and at the ISL prompt enter 'hpux -is'
Sandeep Verma
Occasional Advisor

Re: Increase the /usr logical volume size

1. Reboot the system in Single User Mode.

2. Increase the space allocated to the logical volume,
specified in megabytes, execute:
# /sbin/lvextend -L /dev/vg00/lvol7 (check with bdf the file system for /usr mount point usuall it is /vol7 for /usr)

3. Extend file system size:
# /sbin/extendfs /dev/vg00/rlvol7

4. mount /usr to verify
# mount /usr
# bdf to check for the file system extension

5. Reboot the system into multi user mode
# reboot