Operating System - HP-UX
1833832 Members
2108 Online
110063 Solutions
New Discussion

Increasing size of logical volume

 
Andrew Cunningham_2
Occasional Contributor

Increasing size of logical volume

I've had no success in increasing the size of a logical volume under HP-UX
10.2. The logical volume is /usr and SAM complains that it is in use, so it
can't be unmounted. Starting the machine at run level 1 was no help. SAM still
said it could not unmount it.

Andrew
5 REPLIES 5
Lennox Joseph
New Member

Re: Increasing size of logical volume

First things first:

If you've notified everyone to be off the system.
Execute shutdown, it will bring you to single user mode. Next you do a
sync;sync; everything goes to buffer. Next this might be harsh, but execute a
killall. This kills all processes other than root type. Or you could execute
"ps -ef | grep usr", kill all those processes, execute the same substituting
for "var", then umount -a. Only root should be mounted at this time. If usr or
var is still mounted, execute fuser -u -k /dev/vg00/rlvol8 which will kill any
process running for in this case well say lvol8 is "usr",. Then execute umount
/usr or var whichever is still active. Once successful, begin the process.
increase the size;
lvextend -L 600 /dev/vg00/lvol8;
extendfs -F hfs or vxfs /dev/vg00/rlvol8;
fsck -F hfs or vxfs /dev/vg00/rlvol8; Performs file system check verify
filesystem integrity.
mount -a; Check your filesystem verifying the sizes before executing a reboot.

This should do it.
Neil Gast_1
Frequent Advisor

Re: Increasing size of logical volume

Here's a safer way: Reboot your system, but stop it at the boot prompt. Instead
of booting to single user and killing processes, boot to LVM maintenance mode
using "boot -lm". This mode was created for cases exactly like yours.

Use caution!!!

MrNeil
Paul Heffels_1
Frequent Advisor

Re: Increasing size of logical volume

Just a little note on the side: "... SAM says it's in use ...", guess who's
using it....
James Milward
New Member

Re: Increasing size of logical volume

That SAM, always running in /var!

Other good sources of info on HP website are:
Document Id's: rcfaxfilesystem001 and A5758045

and I also used the search string:

"extend /{xxx}"

in Technical Knowledge Base

Home: HP-UX Software: LVM area.

Where {xxx}=filesystem I wanted to extend.
Al Langen_2
Advisor

Re: Increasing size of logical volume

I assume that you mean extending the size of the filesystem /usr. You can
increase the logical volume without unmounting the logical volume.

The safe way to extend the filesystem is to reboot the system and when prompted
to boot to an alternate path, press any key. Then execute the boot command and
when prompted to interact with ISL, answer y. From ISL, enter hpus -is. This
will put you into single use mode without mounting the filesystems (root is the
exception.) From there, you can use the extendfs command and if you want to
utilize all of the space allocated to the logical volume, use extendfs without
the numeric arguments, i.e., extendfs /dev/vg01/rlvol3 (note: you must use the
device special file (rlvol3, not lvol3.)