extending /usr

 
SOLVED
Go to solution
Spike Burkhardt
Frequent Advisor

extending /usr

Hi all,

I am starting to run out of disk space on /usr and want to know if I can use LVM to extend it. On Solaris with Veritas VM, you can extend it but will run into problems when doing OS upgrades or fixing rootdg. Anyone wish to comment, please?!! Thanks in advance.

spike
Hey, I've got three teenage boys!
7 REPLIES 7
Jeff Schussele
Honored Contributor

Re: extending /usr

Hi Spike,


If you have OnLine JFS you can do this while the FS is up & mounted.
Run this to see if you do have it:

swlist | grep -i online

Then check to see if you have free space in vg00

vgdisplay vg00

Look for the Free PE value.

If both of these are true, then just extend the LV

lvextend -L XXXX /dev/vg00/lvolY

where XXXX=new size in MB and Y=lvol# for /usr (usually 6, but not necessarilly)

Then increase the FS size

fsadm -F vxfs -b XXXXM /usr

where XXXX again = new size in Mb

If you don't have OnLine JFS, you have to reboot & increase the size in single-user mode.

HTH,
Jeff

PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
James R. Ferguson
Acclaimed Contributor
Solution

Re: extending /usr

Hi Spike:

There are no problems with extending '/usr'. Use 'lvextend' to increase the filesystem size. Then, if you have "Online JFS", use 'fsadm' to increase the filesystem itself. You do not need to unmount the filesystem to do this.

If you don't have "Online JFS" then you need to bootup into single user mode; 'lvextned' the logical volume; and then use 'extendfs' to enlarge the filesystem. Then, reboot (my preference) to resume normally.

A good guide to basic LVM on HP-UX can be found in the "Managing Systems and Workgroups: A Guide for HP-UX System Administrators" manual:

http://docs.hp.com/hpux/onlinedocs/B2355-90742/B2355-90742.html

Regards!

...JRF...


Regards!

...JRF...
Anil C. Sedha
Trusted Contributor

Re: extending /usr

Type "bdf" to note down the logical volume name associated with /usr

then

lvextend -L newsizeinMB /dev/vgname/lvname

then if online JFS is not available

umount /usr

extendfs -F vxfs /dev/vgname/rlvname

(note that the "r" is placed before lvname)

mount -a

that's it

if you have online JFS then after the lvextend command run

fsadm -b newsizem /usr

(note that there is a "m" at the end of the filesystem size. like 400m)

-Anil
If you need to learn, now is the best opportunity
Michael Tully
Honored Contributor

Re: extending /usr

Be aware that if you do not have the on-line JFS product you *will* need to boot you system into single-user mode to extend the filesystem. It is near impossible to do even do it even attempting to place the system in a lower run level, as there will be processes that will not have terminated.
Anyone for a Mutiny ?
Spike Burkhardt
Frequent Advisor

Re: extending /usr

Jeff, James, Anil & Michael,

If I understand what you're saying, it is OK to do this. This is supported and will not cause the system problems on upgrades, correct? Thanks for your help!

spike
Hey, I've got three teenage boys!
Pete Randall
Outstanding Contributor

Re: extending /usr

Spike,

Forgive me for answering for Jeff, James, Anil & Michael, but yes, you'll be fine. It won't interfere with upgrades or anything else.


Pete

Pete
Spike Burkhardt
Frequent Advisor

Re: extending /usr

Pete,

No apologies needed. Thanks! That makes life a ton easier.

spike
Hey, I've got three teenage boys!