Operating System - HP-UX
1836579 Members
1915 Online
110102 Solutions
New Discussion

increase/extend a filesystem using vxfs.?

 
SOLVED
Go to solution
Viney Kumar
Regular Advisor

increase/extend a filesystem using vxfs.?

Hi all

How do you calculate the free space available , to increase/extend a filesystem using vxfs.?



Viney
10 REPLIES 10
VK2COT
Honored Contributor

Re: increase/extend a filesystem using vxfs.?

Hello,

Your request lack details. For example,
which version of HP-UX do you use,
and do you have OnlineJFS, or do you
maybe use full version of Veritas Volume
Manager instead of Logical Volume Manager
(LVM)?

Here are the basic details for LVM.

a) Two simple ways to check if you have free
extents in a given volume group:

# print_manifest

or

# vgdisplay

b) Once you confirm you have free space,
and assuming you have OnlineJFS:

Run command lvexend(1m) to increase logical volume size.

Then, run command fsadm(1m) to increase the
file system.

c) If you DO NOT have OnlineJFS, then:

Run command lvexend(1m) to increase the
logical volume size.

Unmount the file system in question.

Then, run command extendfs(1m) to increase
the file system.

If you need more details on the syntax of the above commands, just check many threads
in this Forum, or use on-line manuals.

Cheers,

VK2COT
VK2COT - Dusan Baljevic
sujit kumar singh
Honored Contributor

Re: increase/extend a filesystem using vxfs.?

Hi Vinay,


Suppose u can see from the bdf O/p that /dev/vg02/lvol1 is mounted at /relay and /dev/vg02/lvol2 is mounted on /cucc2 and are of 80 GB and 600 GB respectively.


U want to increase /relay to 130 GB and /cucc2 to 800 GB and that u have enough free PE available in the VG /dev/vg02.

Whether enough Free PE are available in the VG vg02 are available or not u can check by following

#vgdisplay â v vg02

Note the PE Size that is in MB and no of Free PEs and multiply them this gives u the Available Size in the VG /dev/vg02 in MB. Now depending on the Available size u can plan the extension.

If enough Free PE are not available in the VG then u will have to add more PVs that is Disks to te VG using the pvcreate and vgextend command like this.


Suppose u get a new disk /dev/dsk/c10t0d5.

Then to add this disk to the VG u need to do as

#pvcreate /dev/rdsk/c10t0d5
#vgextend /dev/vg02 /dev/dsk/c10t0d5

This shall add the PV to the VG and u can see an increase in the PEs in the VG by the amount of PEs that the disk has.

Then do as following

#lvextend -L 819200 /dev/vg02/lvol1 This extends the lvol1 to 800 GB
#lvextend -L 133120 /dev/vg02/lvol2 This extends lvol2 to 130 GB

If u donâ t have Online JFS
#umount /relay
#umount /cucc2


Extend the Filesystems:
#extendfs -F vxfs /dev/vg02/rlvol1
#extendfs -F vxfs /dev/vg02/rlvol2

#mount /dev/vg02/lvol2 /cucc2
#mount /dev/vg02/lvol1 /relay


Even if u dont have OnlineJFS lvextend, umount and extendfs shall take only minutes to get the things done.


Its will be good that u have OnlineJFS installed on ur system which helps u doing without disruption in work.
Following are the sample steps to the same task if u have OnlineJFS installed in ur system that u can check using #swlist â l product â l bundle | grep â i Online JFS
Then follow the steps:
#lvextend -L and do a subsequent
#fsadm -b /mount_point_of_the_FS>

That is

#lvextend -L 819200 /dev/vg02/lvol1 this extends the lvol1 to 800 GB
# lvextend -L 133120 /dev/vg02/lvol2 This extends lvol2 to 130 GB

#fsadm â F vxfs â b 838860800 /cucc2
#fsadm â F vxfs â b 136314880 /relay



U need not do an unmounting of the filesystem or stopping the application if u have OnlineJFS installed.


Regards

Sujit
sujit kumar singh
Honored Contributor

Re: increase/extend a filesystem using vxfs.?

Hi Vinay,


there is a minor correction in the beginning of the lines

>>>>>>>>>>>>>>"
Suppose u can see from the bdf O/p that /dev/vg02/lvol1 is mounted at /relay and /dev/vg02/lvol2 is mounted on /cucc2 and are of 80 GB and 600 GB respectively.


U want to increase /relay to 130 GB and /cucc2 to 800 GB and that u have enough free PE available in the VG /dev/vg02.">>>>>>>>>>>>.


this should i n compliance to the remaining of the exersice stands as

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Suppose u can see from the bdf O/p that /dev/vg02/lvol1 of 600 GB is mounted at /cucc2 and /dev/vg02/lvol2 of 80 GB is mounted on /relay and


U want to increase /cucc2 to 800 GB and /relay to 130 GB and that u have enough free PE available in the VG /dev/vg02.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


Regards Sujit


SKR_1
Trusted Contributor

Re: increase/extend a filesystem using vxfs.?

Example

vgdisplay /dev/eva8k-01

VG Name /dev/eva8k-01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 4
Open LV 4
Max PV 255
Cur PV 2
Act PV 2
Max PE per PV 1599
VGDA 4
PE Size (Mbytes) 64
Total PE 3198
Alloc PE 1760
Free PE 1438
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

calculate free space

Free PE * PE Size (Mbytes)= 1438 * 64

Do
lvextend -L newsize(MB) lvolname
fsdam -F vxfs -b newsize(MB) mount_point

Thanks

SKR
Eric SAUBIGNAC
Honored Contributor
Solution

Re: increase/extend a filesystem using vxfs.?

Bonjour,

Sorry SKR, but there is a mistake in your answer. If Viney does like this he will reduce the FS ...

So in place of

"fsdam -F vxfs -b newsize(MB) mount_point"

You should read

"fsdam -F vxfs -b newsize(KO) mount_point"

Size of FS must be given in kilobytes

HTH

Eric
SKR_1
Trusted Contributor

Re: increase/extend a filesystem using vxfs.?

Hi Eric,

Sorry, a little mistake from me. Actually i was telling to give capital M when you are specifying the size in MB. For Example ( for making 10 GB )

fsadm -F vxfs -b 10240M mountpoint

Thanks

SKR
Dennis Handly
Acclaimed Contributor

Re: increase/extend a filesystem using vxfs.?

>SKR: fsadm -F vxfs -b 10240M mountpoint

You can also have the shell do the work for you:
fsadm -F vxfs -b $((10 * 1024))M mountpoint
Eric SAUBIGNAC
Honored Contributor

Re: increase/extend a filesystem using vxfs.?

SKR and Denis,

Are you sure that fsadm supports a flag like M ? As far as I known fsadm works only in sector, not in Mo, no more in Ko. But because sector size is usually 1024 octets, new size is usually assumed as Ko.

==> fsadm -F vxfs -b $((10 * 1024 * 1024)) mountpoint

Eric
yulianto piyut
Valued Contributor

Re: increase/extend a filesystem using vxfs.?

Check the volume group consists of your logical volume that want to be extended.
# vgdisplay vg_name

check "Free PE" and "PE Size (Mbytes)", calculate Free PE x PE Size, for example:
Free PE 1200
PE Size (Mbytes) 32

free space available= 1200 x 32 = 38400 Mbytes
to increase filesystem, for ex: lvol1:
# lvextend -L new_size /dev/vg_name/lvol1
# umount /mount_point_name
# extendfs -F vxfs -o largefiles /dev/vg_name/rlvol1
# mount /mount_point_name
Viney Kumar
Regular Advisor

Re: increase/extend a filesystem using vxfs.?

Thanks to all