HP-UX LVM – Resizing Filesystem with Online JFS

This item was filled under [ HPUX ]

hpux_logoIn most HP-UX server storage,logical volume management, or LVM, is the method of allocating space on mass storage devices that is more flexible than conventional partitioning schemes. In particular, a volume manager can concatenate, stripe together or otherwise combine partitions into larger virtual ones that can be resized or moved, possibly while it is being used.

Below is 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 /mountpoint3. Determine the Logical Volume where the filesystem is mounted.
# bdf /mountpoint
Example:
[root@johnellaverilla:/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@johnellaverilla:/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@johnellaverilla:/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@johnellaverilla:/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

  • Share/Bookmark

Related posts:

  1. HP-UX: Removing LVM Filesystems
  2. HP-UX: How To Remove Volume Groups Easily
  3. HP-UX: Preparing for System Reboot / Shutdown
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Comment