HP-UX HB v13.00 Ch-13 - LVM

HP-UX Handbook Rev 13.00 Page 29 (of 110)
Chapter 13 LVM
October 29, 2013
NOTE: You may get the following error:
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg01/lvdata" could not be extended.
Failure possibly caused by contiguous allocation policy.
Failure possibly caused by strict allocation policy
The reason for that is exactly one of the above.
If the LV has been extended successfully you need to increase the FS that resides on
that LV:
Without OnlineJFS you have to umount the FS first:
# umount /dev/vg01/lvdata
# extendfs /dev/vg01/rlvdata
# mount /dev/vg01/lvdata <mountpoint>
With OnlineJFS you do not need to umount. Use fsadm instead:
# fsadm -b <new size in KB> <mountpoint>
NOTE: Reducing a LV without OnlineJFS is not possible. You have to backup the
data, remove and recreate the LV, create a new FS and restore the data from the
backup into that FS.
With OnlineJFS you can try to reduce the FS using fsadm specifying the new size in KB.
Due to some design limitations this often fails with JFS 3.1 and older. After fsadm
successfully reduced the FS you can use lvreduce to reduce the underlying LV:
# lvreduce -L <new size in MB> /dev/vg01/lvdata
For details regarding JFS and OnlineJFS consult the JFS Chapter.
To change the name of a LV you can simply rename the LV devicefiles:
# umount /dev/vg01/lvol1
# mv /dev/vg01/lvol1 /dev/vg01/lvdata
# mv /dev/vg01/rlvol1 /dev/vg01/rlvdata
# mount /dev/vg01/lvdata <mountpoint>
There are several other characteristics of an LV that can be modified. Most commonly
used are allocation policy, bad block relocation and LV IO-timeout. For details look at
the lvchange man page.