Resizing filesystem online on HP-UX

Resizing filesystem online on HP-UX

Check the volume group and logical volume being used by the filesystem

root@hp-ux:/root # bdf /example
Filesystem kbytes used avail %used Mounted on
/dev/vg01/lvol14 32768 2141 28720 7% /example

This logical volume has 32MB and uses 2 PE

root@hp-ux:/root# lvdisplay /dev/vg01/lvol14
— Logical volumes —
LV Name /dev/vg01/lvol14
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 32
Current LE 2
Allocated PE 2
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
Each PE has 16MB and there is 1047 available

root@hp-ux:/root# vgdisplay vg01
— Volume groups —
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 16
Open LV 16
Max PV 40
Cur PV 2
Act PV 2
Max PE per PV 50000
VGDA 4
PE Size (Mbytes) 16
Total PE 12796
Alloc PE 11749
Free PE 1047
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 31250g
VG Max Extents 2000000

Checking if it is possible to resize online the filesystem. In some HP-UX versions, this feature is not available

root@hp-ux:/root# swlist -l product | grep -i jfs
AONLINEJFS B.05.01.02 OnlineJFS 5.0.1 Integration Product
JFS B.11.31 Base VxFS File System 4.1 for HP-UX
OnlineJFS01 5.0.31.6 Online features of the VxFS File System

Extending filesystem to 5120MB

root@hp-ux:/root# lvextend -L 5120 /dev/vg01/lvol14
Logical volume “/dev/vg01/lvol14” has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf

Increased logical volume to 320 PE adn 5120MB

root@hp-ux:/root# lvdisplay /dev/vg01/lvol14
— Logical volumes —
LV Name /dev/vg01/lvol14
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 5120
Current LE 320
Allocated PE 320
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

Now running fsadm to increase the filesystem

root@hp-ux:/root# fsadm -F vxfs -b 5120m /example
UX:vxfs fsadm: INFO: V-3-25942: /dev/vg01/rlvol14 size increased from 32768 sectors to 5242880 sectors

root@hp-ux:/root# bdf /example
Filesystem kbytes used avail %used Mounted on
/dev/vg01/lvol14 5242880 3417 4912004 0% /example

Advertisement