HP-UX 11i v3 Using LVM Logical Volume Snapshots (September 2010)

17
Figure 4: Deleting logical volumes on a snapshot tree
A
B
Y
Z
A
X
C
D
A
B
C
D
LV S1 S0
Deletion of a single snapshot can be a lengthy operation because of the unshare data copy. In
addition, the amount of data that is copied to the predecessor depends on the size of the logical
volume and the amount of data unshared on the logical volume being deleted.
To delete a snapshot and all its predecessors, use the lvremove -F option. Because the snapshot
and all its predecessors are deleted at the end of this operation, the shared data is not copied to the
snapshot predecessor. If the snapshot predecessors do not contain any valuable data or if all the
predecessors have been marked inoperative, HP recommends you use the -F option to delete all the
predecessors. The –F option is ignored if it is specified with the last predecessor on a snapshot tree.
For more information, see lvremove(1M).
Example
To delete all the snapshots of the original logical volume /dev/vg01/lvol1, follow these steps:
1. Identify the predecessor of the original logical volume using the Associated snapshots field of
lvdisplay output of the original logical volume as follows:
# lvdisplay /dev/vg01/lvol1
--- Logical volumes ---
LV Name /dev/vg01/lvol1
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 40
Current LE 10
Allocated PE 10
Stripes 0
Stripe Size (Kbytes) 0
Bad block NONE
Allocation strict
IO Timeout (Seconds) default
Number of Snapshots 3
Associated snapshots /dev/vg01/lvol1_S4
/dev/vg01/lvol1_S3
/dev/vg01/lvol1_S2
In this example, /dev/vg01/lvol1_S4 is the immediate predecessor of the original
logical volume.