Controlling Lvm Device Scans With Filters - Red Hat ENTERPRISE LINUX 5.1 - LVM ADMINISTRATION Manual

Table of Contents

Advertisement

Chapter 4. LVM Administration with CLI Commands
After you create a snapshot logical volume, specifying the origin volume on the lvdisplay command
yields output that includes a a list of all snapshot logical volumes and their status (active or inactive).
The following example shows the status of the logical volume /dev/new_vg/lvol0, for which a
snapshot volume /dev/new_vg/newvgsnap has been created.
# lvdisplay /dev/new_vg/lvol0
--- Logical volume ---
LV Name
VG Name
LV UUID
LV Write Access
LV snapshot status
LV Status
# open
LV Size
Current LE
Segments
Allocation
Read ahead sectors
Block device
The lvs command, by default, displays the origin volume and the current percentage of the snapshot
volume being used for each snapshot volume. The following example shows the default output for
the lvs command for a system that includes the logical volume /dev/new_vg/lvol0, for which a
snapshot volume /dev/new_vg/newvgsnap has been created.
# lvs
LV
VG
lvol0
new_vg owi-a- 52.00M
newvgsnap1 new_vg swi-a-
Note
Because the snapshot increases in size as the origin volume changes, it is important
to monitor the percentage of the snapshot volume regularly with the lvs command
to be sure it does not fill. A snapshot that is 100% full is lost completely, as a write
to unchanged parts of the origin would be unable to succeed without corrupting the
snapshot.

4.6. Controlling LVM Device Scans with Filters

At startup, the vgscan command is run to scan the block devices on the system looking for LVM
labels, to determine which of them are physical volumes and to read the metadata and build up a list
of volume groups. The names of the physical volumes are stored in the cache file of each node in the
system, /etc/lvm/.cache. Subsequent commands may read that file to avoiding rescanning.
36
/dev/new_vg/lvol0
new_vg
LBy1Tz-sr23-OjsI-LT03-nHLC-y8XW-EhCl78
read/write
source of
/dev/new_vg/newvgsnap1 [active]
available
0
52.00 MB
13
1
inherit
0
253:2
Attr
LSize
Origin Snap%
8.00M lvol0
Move Log Copy%
0.20

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 5.1 cluster logical volume manager

Table of Contents