Operating System - HP-UX
1832831 Members
2969 Online
110047 Solutions
New Discussion

Re: growing a filesystem that is on the san

 
SOLVED
Go to solution
jthrumston
Advisor

growing a filesystem that is on the san

I have a san based filesystem that needs growing. I have pretty much figured out how to create a metalun (because the original lun is all used up).
But what I don't know exactly is what to do on the unix side once I create that metalun

The plan.
1. I have a 5g lun that is full, I intend to create a 5g metalun to join it (EMC cx400). Once I have done that I suppose I need to find a way on the HPUX (11i) box to make it aware that the lun is bigger now. Then once it knows that use my OnlineJFS to grow the filesystem.

Later (another down time) I plan to create a new 10g lun, migrate my 2 part lun there and remount the filesystem so it is all one lun.

My problem is I don't know what to use to tell the HP box that the lun it knows is now 5g bigger so I can use the onlineJFS to grow the filesystem. Any help?

If this doesn't make sense, ask me questions and I will try and clear it up. Thanks.
If I wasn't here, I would be someplace else
8 REPLIES 8
David Bellamy
Respected Contributor

Re: growing a filesystem that is on the san

ithrumston would it not be easier just to create another 5g lun and do a pvcreate and add it to the vg and then extend the filesystem to the size you want.

1. pvcreate "new lun"
2. vgextend "new lun"
3. lvextend -L 10g
4. extendfs -F vxfs "filesystem"
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: growing a filesystem that is on the san

The answer varies somewhat with the version of HP-UX you are running so I give you an approach that will work regardless of the HP-UX version.

1) Create a 2nd GiB LUN and make sure that it is zoned for your HP-UX box.
2) ioscan -C disk -fn
3) Use vgextend to add the 2nd LUN to your existing volume group.
4) Use lvextend to grow your existing LVOL.
5) Use fsadm -F vxfs -b larger_size to grow the filesystem.

The above steps assume that you are running LVM rather than VxVM; if using VxVM the steps are similar. It also assumes that you are running OnlineJFS. If so, you can do all of this "on the fly" and with applications running.

There is really no advantage to later converting this to a 10GiB LUN although you are certainly free to do so.
If it ain't broke, I can fix that.
Geoff Wild
Honored Contributor

Re: growing a filesystem that is on the san

You don't want to change the size of an existing lun - you will corupt data.

You are best to create a new lun and extend the vg and then the file system.

Only way to do what you want is, backup data, export the vg, change the lun size, re-create the vg, create your lvols / filesystems, then restore your data.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
A. Clay Stephenson
Acclaimed Contributor

Re: growing a filesystem that is on the san

Ooops, I'm stupid, I left out a small step:

1) Create a 2nd GiB LUN and make sure that it is zoned for your HP-UX box.
2) ioscan -C disk -fn
3) run pvcreate on new LUN
4) Use vgextend to add the 2nd LUN to your existing volume group.
5) Use lvextend to grow your existing LVOL.
6) Use fsadm -F vxfs -b larger_size to grow the filesystem.

If it ain't broke, I can fix that.
J. Bravo
Respected Contributor

Re: growing a filesystem that is on the san

Hello:

I'm afraid that with metalun you cannot resize the PV without recreating it (pvcreate), because the size of the PV is hardcoded into the PVRA... If it's the only disk in the VG, you can backup your data, remove the VG, create your PV, recreate the VG and the LV and finally restoring your data...

Regards;

J. Bravo.
jthrumston
Advisor

Re: growing a filesystem that is on the san

To A. Clay Stephenson

What would you need to know about what version of HPUX that I am running to verify this. You make it sound awfully simple, maybe it is, but being new to it I am a little confused.

I am running HPUX B.11.11

Thanks to all for the help so far.
If I wasn't here, I would be someplace else
A. Clay Stephenson
Acclaimed Contributor

Re: growing a filesystem that is on the san

If you are running 11.23 or later then you have the (now) supported vgmodify command which will allow you to increase the size of a PV but the method I outlined above is really the safer and better alternative. Man vgmodify for details.
If it ain't broke, I can fix that.
jthrumston
Advisor

Re: growing a filesystem that is on the san

Great, thank you and everyone for the help I think now I can get this done..

Regards,
If I wasn't here, I would be someplace else