Operating System - HP-UX
1833176 Members
2958 Online
110051 Solutions
New Discussion

HowTo Expand Volume Group size

 
SOLVED
Go to solution
Marty Metras
Super Advisor

HowTo Expand Volume Group size

I'm on a HP 9000/800 N class box running HP 11.0
/usr is at 88% and I want to expand it. I a lot od unallocated space on the drive. It is /dev/vg00/lvol7 and it is mirrored.
How do I do this?
I kinda understand what has to happen. It is just that I have never done it before.
Can you help?
Marty
The only thing that always remain the same are the changes.
13 REPLIES 13
Christopher McCray_1
Honored Contributor

Re: HowTo Expand Volume Group size

#lvextend -L /dev/vg00/lvol
#extendfs -F vxfs /dev/vg00/rlvol7

but first you need to go down to single user mode to do this. sorry.

Chris
It wasn't me!!!!
Bill McNAMARA_1
Honored Contributor

Re: HowTo Expand Volume Group size

mount -p
find /usr

lvdisplay /dev/vg00/lvol(ofusr)

find the allocated PE and PE size
PE allocated to lvol = A1
PE Size = B
----------------------------
A1*B = ZMB lvol

vgdisplay vg00
Free PE's = A2
PE Size = B
-----------
A2*B= Free MB

lvextend -l A1+A2 /dev/vg00/lvol

fsadm -F vxfs -b (block size from bdf..) /usr

If you have online jfs,
otherwise extendfs when the filesystem is not mounted.. ie reboot if you're thinking of /usr/

Later,
Bill
It works for me (tm)
Uday_S_Ankolekar
Honored Contributor

Re: HowTo Expand Volume Group size

Hi,

lvextend -L /dev/vg00/lvol7
then use fsadm to increase the file system size

GoodLuck

-USA..
Good Luck..
Christopher McCray_1
Honored Contributor

Re: HowTo Expand Volume Group size

Just as an aside, I don't think you meant to say increase the volume group size, rather file system size, which is what would be done here, except if you don't have enough free disk space.

Second aside, you wouldn't have to go to single user mode if you have online jfs.

Third aside, /usr really isn't that full. Unless you anticipate loading a lot more stuff on it, you really don't need to at this time.

Good luck,
Chris
It wasn't me!!!!
Joseph C. Denman
Honored Contributor

Re: HowTo Expand Volume Group size

Hi Marty,

88% is not too bad. I probably would not worry about it. However, if you wish, I think the below will do the trick.

To extend /usr you will need to get the system up in single user mode.

break boot sequence
type "boot pri isl"
type y to interact
type "hpux -is" #boots to single user mode

lvextend -L newsizingMB /dev/vg00/lvol7
extendfs /dev/vg00/rlvol7

reboot

That should do it. I would be sure to create a new ignite tape prior. **just to be safe. Plus a new ignite tape after.

...jcd...
If I had only read the instructions first??
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: HowTo Expand Volume Group size

If you have OnlineJFS then this is very easy. Simply use SAM->Disks & FileSystems->Logical Volumes->Actions->Increase Size. Input the new total size (not simply the increase amount) and SAM will do the rest. It's almost certain that you have OnlineJFS since almost everybody who buys Mirror/UX also buys the OnlineJFS.

If you don't have OnlineJFS, then you will have to go to single user with /usr unmounted.
You then can do an lvextend and an extendfs.
Man lvextend and extendfs for the details. Both of those operations are quite easy but if this is your first time, I would certainly suggest that you use SAM.

Clay
If it ain't broke, I can fix that.
Sridhar Bhaskarla
Honored Contributor

Re: HowTo Expand Volume Group size

Yours is /usr.

You need to boot in single user mode and then expand. As you mentioned you have a lot of space on the disks (should be on both the disks, the primary and the mirror). If you have OnlineJFS installed you can do it without getting it into single user mode.


1.Shutdown the system
2.Boot through IPL
ISL> hpux -is
3. Once you get into single user mode, you will not have anything other than / and /stand mounted. You need to use /sbin/lv* commands to do this for you.

#/sbin/lvextend -L new_size_in_MB /dev/vg00/lvol7
#extendfs /dev/vg00/rlvol7

The above should be the total new size. For ex., if you want to increase /usr from 1000 MB to 1500MB, it should be 1500MB. Mirroring will be automatically taken care if you have enough space on both the disks.

#mount /usr
#bdf /usr

Verify if it is of the new size.

#init 3 (or 4 depending on your initdefault in /etc/inittab)

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Santosh Nair_1
Honored Contributor

Re: HowTo Expand Volume Group size

A couple of things to keep in mind is that since the filesystem /usr is mirrored, you have to make sure you have enough extents on both drives to accomodate the new size. That is, if you intend on increasing the filesystem by 256 PEs, i.e. 1024 MB (256 PE x 4MB/PE), then you have to have 256 PEs on both drives of the mirror. You can check this by doing a lvdisplay -v and then checking the PVs that this LV uses.

Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
Bernie Vande Griend
Respected Contributor

Re: HowTo Expand Volume Group size

I agree with what was said earlier, 88% should probably be fine as /usr shouldn't be growing much if any. If it is growing, find out what is and move it to another file system.

Also, if you do need to increase it, the key is to first make sure there is enough space in vg00 to even increase it.
Do a vgdisplay vg00 and look at Free Extents. usually an extent is 4MB. This is how much you have to increase.
If its 0 and you still need more space in /usr, then you'll probably have to move all of /usr or part of it to another volume group, or add another disk to vg00. I'd just move part or all of /usr before adding another disk to vg00.
If you have space to increase /usr follow the instructions above (boot single user, lvextend, extendfs)
Ye who thinks he has a lot to say, probably shouldn't.
Joseph Chakkery
Valued Contributor

Re: HowTo Expand Volume Group size

Hello,

$/sbin/shutdown -> for single user mode./sbin/mount -> will $mount /usr/sbin/lvextend ???L newsize /dev/vg00/lvol? -> extend the lvol size
$/sbin/umount /usr -> unmount
$/usr/sbin/extendfs /dev/vg00/rlvol? -> Extend file system size to lvol size
$/sbin/mount /usr -> mount
$/usr/sbin/reboot ???r -> reboots in multiuser mode.

Regards
Joe.
Knowledge is wealth
Joseph Chakkery
Valued Contributor

Re: HowTo Expand Volume Group size

Sorry for previous one. Put $ on wrong place.


$/sbin/shutdown -> for single user mode.
$/sbin/mount -> will mount /usr
$/sbin/lvextend ???L newsize /dev/vg00/lvol? -> extend the lvol size
$/sbin/umount /usr -> unmount /usr
$/sbin/extendfs /dev/vg00/rlvol? -> Extend file system size to lvol size
$/sbin/mount /usr -> mount /usr
$/sbin/reboot ???r -> reboots in multiuser mode.


Regards
Joe.
Knowledge is wealth
Sanjay_6
Honored Contributor

Re: HowTo Expand Volume Group size

Hi Marty,

Look at the thread below for extending /usr if you don't have online JFS.

http://us-support2.external.hp.com/cki/bin/doc.pl/sid=6313377312d31518cc/screen=ckiDisplayDocument?docId=200000046785431

with online JFS, you can increase the size without a reboot.

Hope this helps.

Thanks
Marty Metras
Super Advisor

Re: HowTo Expand Volume Group size

Thank you all. It took 10 minutes.
This Is a new box and we needed a little more space for apps. Both sides of the mirror are the same. and I still have 8Gb unused.
I used vgdisplay and lvdisplay to verify it was OK. Then I used SAM to get the job done.
All went fine.
Mirror is synced and I am rebooting it now just for fun.
Thanks again for all your help.
Marty
The only thing that always remain the same are the changes.