HP-UX LVM – Resizing Filesystem with Online JFS

A quick guide to extend an LVM with a VXFS Filesystem.

1. Verify OnLineJFS is installed
# swlist -l product | grep -i vxfs
# swlist -l product | grep -i online

Look for OnlineJFS or AdvJournalFS

2. It is a good practice to defrag the filesystem first before extending
# fsadm -d – D -e – E /mountpoint

3. Determine the Logical Volume where the filesystem is mounted.
# bdf /mountpoint
Example:

[root@gmhpux02:/root]
# bdf /var/adm/crash
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lv_crash 5357568 2266637 2897770 44% /var/adm/crash

4. Obtain the current size of the Logical Volume (Mbytes)
# lvdisplay /dev/volumegroup/logicalvolume
Example:

[root@gmhpux02:/root]
# lvdisplay /dev/vg00/lv_crash
— Logical volumes —
LV Name /dev/vg00/lv_crash
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 5232
Current LE 327
Allocated PE 654
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

5. Our current size is 5232 Mbytes. Let us say that we will extend the filesystem by 100 Mbytes. Get the sum of the current size and the size to be added. This will add to 5332 Mbytes. Take note of this.

6. Adjust the size of the Logical Volume.
# lvextend -L new_size_in_mbytes
Example:
[root@gmhpux02:/root]
# lvextend -L 5332 /dev/vg00/lv_crash
Logical volume “/dev/vg00/lv_crash” has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

7. Adjust the size of the Filesystem
# fsadm -b new_sizem /mountpoint
Example:
[root@gmhpux02:/root]
# fsadm -b 5332m /dev/vg00/rlv_crash
fsadm: /etc/default/fs is used for determining the file system type
UX:vxfs fsadm: INFO: V-3-23585: /dev/vg00/rlv_crash is currently 524288 sectors – size will be increased

8. Verify new size of the filesystem
# bdf /mountpoint

Leave a Comment

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top