Operating System - HP-UX
1828359 Members
3006 Online
109976 Solutions
New Discussion

Re: Adding 16GB space to existing file system

 
sfgroups
Advisor

Adding 16GB space to existing file system

Hi all,
I want to extend existing file system by 16GB with our affecting the existing data. Got new LUN from SAN.

HP-UX 11.11 with Online-JFS, vxfs file system

Here are the steps I am going use.

Pvcreate -f /dev/rdsk/c16t1d7
vgextend /dev/vg02 /dev/dsk/c16t1d7

umount /dbvol01

lvextend -L 16384 /dev/vg02/dbvol01

extendfs /dev/vg02/rdbvol01
mount /dbvol01


Will this work? My main concern is to preserving old data.

Thanks
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: Adding 16GB space to existing file system

Hi:

Since you say you have OnlineJFS there is no reason to unmount the filesystem to extend it. You should be able to use 'fsadm' to perform this task while it is mounted.

When you do the 'lvextend -L' the expectation is that the size specified is *greater* than the current size.

As always, it is good insurance to backup your filesystem before performing maintenance.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: Adding 16GB space to existing file system

There may be a few extra steps to get the system to recognize the new disk.

ioscan -fn
insf -C Disk

This will create then new device nodes.
next your pvcreate and vgextend.

There is no point in umounting the filesystem. Simply do your lvextend then a fsadm -F vxfs -b newsizein_1KB_sectors. Man lvextend and fsadm_vxfs for details.

You can also use SAM->Disks and Filesystems to do every step of this.

It's a very normal task to increase the size of filesystems "on the fly" and I almost always do it w/o a backup because it is an almost foolproof task --- which is not to say that it can't be blown to pieces. It's a good idea to make sure that your LVM/vxfs patches are up to date but other than that (and especially if you use SAM as a novice), everything just works. The key is to specify the total new size of the LVOL rather than simply the size of the increase. For example, just last week I expanded an LVOL that houses Oracle data and the users never even knew it. The filesystem was not unmounted nor was the database downed; it was all "on the fly".
Things are a little more complicated if the VG is part of a ServiceGuard cluster but if this is a standalone VG with OnlineJFS then this is a piece of cake.
If it ain't broke, I can fix that.
Uday_S_Ankolekar
Honored Contributor

Re: Adding 16GB space to existing file system

If you have online jfs no need to umount

Other then that everything else should be OK
for extendfs

extendfs -F vxfs /dev/vgnn/lvolname

-USA..
Good Luck..
Shahul
Esteemed Contributor

Re: Adding 16GB space to existing file system

Hi,

If you have online JFS, here is the steps I would do.

find out the right device file for newly added disk by ioscan, diskinfo like commands.
then,

pvcreate /dev/rdsk/cxtydz

Do a vgdisplay and check tje Max PE per PV, if this is set to very less, there is no point in adding a very big disk to it, any way.. you can continue with what you have,

vgdisplay /dev/vgxx
vgextend /dev/vgxx /dev/dsk/cxtydz
lvextend -L /dev/vgxx/lvolx

Please note that the size in lvextend should be the final size, for eg. current lvol size is 100MB and you are adding another 200MB, then the size with -L will be 300.

fsadm -b m /mount_point

Again the size with fsadm will be final size, if you are giving in MB, you need to give a "m" suffix else you need to give in sectors.

As mentiobned above, always suggested to have a copy of backup in hand.

If you do not have Online JFS, then you have to unmount and use extendfs command.

Best of luck
Shahul
sfgroups
Advisor

Re: Adding 16GB space to existing file system

Thanks for all your usefull informaiton. Now I have increase the file system space.


-SR