Operating System - HP-UX
1833867 Members
2420 Online
110063 Solutions
New Discussion

Re: Increasing size on existing Filesystems

 
SOLVED
Go to solution
RedBack
Frequent Advisor

Increasing size on existing Filesystems

I have and existing Volume Group, It holds existing LV's which in turn have file systems.

I need to increase the size of the File Systems with new disks that have been allocated.
I need to split the space between all the File Systems.
I would just like to confirm the steps require as it is a live production machine.

11 REPLIES 11
Hai Nguyen_1
Honored Contributor

Re: Increasing size on existing Filesystems

1. pvcreate /dev/rdsk/c?t?d?
2. vgextend vg?? /dev/dsk/c?t?d?
3. Use SAM to add space to existing filesystems; it is friendly and safe. You do not have to bring down a filesystem to extend its size.

Good luck.

Hai
Stefan Farrelly
Honored Contributor

Re: Increasing size on existing Filesystems


The earlier reply is on the right track but to extend an existing filesystem (ie. something already mounted) you need to either unmount it or use some purchaseable software called OnlineJFS (which has an fsadm command to extend on the fly).

If you have OnlineJFS then its easy, lvextend your lvol then use fdadm -F vxfs -b
If not then you need to unmount your filesystem, lvextend it, then run extendfs on it, then remount it.

Or just create some new mountpoints with your new space.
Im from Palmerston North, New Zealand, but somehow ended up in London...
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Increasing size on existing Filesystems

First of all, are the new disks larger than the disk with which the VG was originally created? In that case, you will only be able to that fraction of the new disk which equals the original disk's size. Your better option is to create a new VG in that case starting with your largest disk.

If you are simply adding disks (and you have OnlineJFS) then
1) pvcreate each new disk
2) vgextend the VG using the paths for each of the new disks
3) lvextend each LVOL specify the desired physical disk to furnish the additional extent
4) use fsadm -F vxfs -b to extend an OnlineJFS filesystem or extendfs for unmounted vxfs of hfs filesystems.

If it ain't broke, I can fix that.
MANOJ SRIVASTAVA
Honored Contributor

Re: Increasing size on existing Filesystems

Hi MWH


If you have online jfs installed it is easy.

volume group vg01
disk device cxtydz


pvcreate -f /dev/rdsk/cxtydz
vgextend /dev/vg01 /dev/dsk/cxtydz

lvexentd -L 1000 /dev/vg01/rvlol2

extendfs /dev/vgo1/rlvol1



Manoj Srivastava
A. Clay Stephenson
Acclaimed Contributor

Re: Increasing size on existing Filesystems

One more point, you will need to run insf to create the new devive node. Your other option is to simply use SAM -> Disks & Filesystems. It will step you quite nicely through all the steps.
If it ain't broke, I can fix that.
Uday_S_Ankolekar
Honored Contributor

Re: Increasing size on existing Filesystems

Hello,

If you have online JFS then life is bit easy.!

If you are adding a new disk to existing VG then

pvcreate, vgextend, lvextend , and then fsadm commands can be used.

pvcreate /dev/rdsk/cxtydz.
vgexnted /dev/vgnn /dev/ds/cxtydz
lvextend -l (new extent number) /dev/vgnn/lvolnn /dev/dsk/cxtydz . You can use -L option and give new total size of the disk in mb.
fsadm -F vxfs -b newsize in (you need to put M immeditiely after the size viz 3000M)
Thats it. If you have mirror then you can use -m option with lvextend.

Goodluck,

-USA..

Good Luck..
S.K. Chan
Honored Contributor

Re: Increasing size on existing Filesystems

This depends if you have OnlineJFS or not, if you have it installed then the FS can be extended on-the-fly without needing to umount it. Example vg02 and you're adding c2t2d0 to it and you want to extend lvol1 which is mounted on /apps.

No-OnlineJFS
=============
# pvcreate /dev/rdsk/c2t2d0
# vgextend /dev/vg02 /dev/dsk/c2t2d0
You then need to unmount /apps to increase it.
# cd /
# umount /apps
# lvextend -L 2400 /dev/vg02/lvol1
==> New size is now 2.4GB
# extendfs -F vxfs /dev/vg02/rlvol1
==> Extending the FS. Replace "vxfs" with "hfs" is you're using HFS.
# mount -a

With-OnlineJFS
=-=-==========
# pvcreate /dev/rdsk/c2t2d0
# vgextend /dev/vg02 /dev/dsk/c2t2d0
# lvextend -L 2400 /dev/vg02/lvol1
# fsadm -b 2457600 /apps
==> Extending /apps on-the-fly. (2400*1024)
RedBack
Frequent Advisor

Re: Increasing size on existing Filesystems

Thank you all.
I do have onlineJFS so I will use fsadm.
How do I calculate the value for the -l in lvextend and also the -b in fsadm?
Stefan Farrelly
Honored Contributor

Re: Increasing size on existing Filesystems


The -l is extent size (in 4MB chunks usually) or you can use -L which is easier.

For the -b option for fsadm its the size in Megabytes*1024, eg. 1000Mb * 1024 = fsadm -F vxfs -b 1024000
Im from Palmerston North, New Zealand, but somehow ended up in London...
MANOJ SRIVASTAVA
Honored Contributor

Re: Increasing size on existing Filesystems

Hi MWH

is you haver to increase the size by 400 MB as it says at the last of the amnpages do

lvextend -l 400 /dev/vg01/rvlol1


Manoj Srivastava
Arockia Jegan
Trusted Contributor

Re: Increasing size on existing Filesystems

Hi,

#lvextend -l /dev/vg01/

Here replace the value with number of physical extensions (Size= no of physical extensions X PE size)

#lvextend -L /dev/vg01/

Here replace the value with size of the volume.