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

HP-UX Handbook Rev 13.00 Page 63 (of 110)
Chapter 13 LVM
October 29, 2013
Running vgreduce with the -f option would remove all PVs that are “free”, i.e there is no
LV having extents on that PV. Otherwise - if the PV is not free - vgreduce -f reports an
extent map to identify the associated LVs:
# vgreduce -f vg01
skip alternate link /dev/dsk/c1t2d2
vgreduce: Couldn't query physical volume "/dev/dsk/c0t11d0":
The specified path does not correspond to physical volume attached to this volume
group
Not all extents are free. i.e. Out of 508 PEs, only 500 are free.
You must free all PEs using lvreduce/lvremove before the PV can be removed.
Example: lvreduce -A n -m 0 /dev/vg01/lvol1.
lvremove -A n /dev/vg01/lvol1.
Here's the map of used Pes
--- Logical extents ---
LE LV PE Status 1
0000 lvol1 0000 ???
0001 lvol1 0001 ???
0002 lvol1 0002 ???
...
In this case lvol1 is having extents on device c0t11d0. You have to remove these
extents from the PV before you are allowed to actually remove the PV from the VG. If
the LV is mirrored use the command lvreduce to remove its mirrored extents. If the LV is
unmirrored, data is lost anyway and you have to use lvremove to delete the LV.
Check the LV state:
# lvdisplay -v /dev/vg01/lvol1
lvdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t11d0":
The specified path does not correspond to physical volume attached to
this volume group
lvdisplay: Couldn't query the list of physical volumes.
--- Logical volumes ---
LV Name /dev/vg01/lvol1
VG Name /dev/vg01
LV Permission read/write
LV Status available/stale
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 32
Current LE 8
Allocated PE 16