LVM Volume Group Quiesce/Resume

Sample disk snapshot procedure
This is just a sample of what is typically done to create a snapshot image for backup
purposes. The actual commands invoked are dependent upon the application and the disk
hardware.
1. Flush cached data to disks and/or suspend the applications
Some applications do not require any special procedure prior to quiescing the volume
group under them. Some applications may have to flush their in-memory data and enter
a special backup mode to provide a proper disk image for back-up purposes. Some file
systems provide a freeze feature to flush any disk data cached in memory and suspend
their activities.
2. Quiesce the LVM volume groups using the vgchange command
vgchange –Q rw vgname
Most often the volume groups can be quiesced using the read and write (rw) quiesce
mode. In this mode LVM prevents application reads and writes from proceeding to the
volume group. If an application can continue to read the data while the snapshot is in
progress and this does not impede the snapshot process, use the write (w) quiesce mode
instead. This mode allows applications to continue reading from the volume group
while the snapshot is taken, potentially improving data availability.
3. Snapshot the hardware using disk array or backup utilities
Create a snapshot copy of the disks in the volume group. Although the Volume Group
Quiesce/Resume feature is intended to be used with backup management or disk
management packages, there are many ways to create a duplicate of the data depending
upon the type of disks or the array used in the volume group.
4. Use vgchgid to differentiate the snapshot copy of the volume group
from the original
vgchgid /dev/rdisk/disk1 /dev/rdisk/disk2...
The command is used here to change the volume group identifier on all the disks in the
snapshot volume group, so that LVM recognizes it as a different volume group.
5. Resume the LVM volume group using the vgchange command
vgchange –R vgname
6. Resume applications (if they were suspended earlier).
9