diff options
author | Mike Snitzer <snitzer@redhat.com> | 2010-03-05 21:29:56 -0500 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2010-03-05 21:29:56 -0500 |
commit | c53a381efbe3d0e0629121b3f0d2b62a0e167791 (patch) | |
tree | 96807004e3f27c7030e744b95f0b1e2d73223e8d | |
parent | ecdb2e257abc33ae6798d3ccba87bdafa40ef6b6 (diff) |
dm: document when snapshot has finished merging
Update Documentation/device-mapper/snapshot.txt to cover "How to
determine when a snapshot has finished merging".
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
-rw-r--r-- | Documentation/device-mapper/snapshot.txt | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Documentation/device-mapper/snapshot.txt b/Documentation/device-mapper/snapshot.txt index e3a77b215135..0d5bc46dc167 100644 --- a/Documentation/device-mapper/snapshot.txt +++ b/Documentation/device-mapper/snapshot.txt | |||
@@ -122,3 +122,47 @@ volumeGroup-base: 0 2097152 snapshot-merge 254:11 254:12 P 16 | |||
122 | brw------- 1 root root 254, 11 29 ago 18:15 /dev/mapper/volumeGroup-base-real | 122 | brw------- 1 root root 254, 11 29 ago 18:15 /dev/mapper/volumeGroup-base-real |
123 | brw------- 1 root root 254, 12 29 ago 18:16 /dev/mapper/volumeGroup-base-cow | 123 | brw------- 1 root root 254, 12 29 ago 18:16 /dev/mapper/volumeGroup-base-cow |
124 | brw------- 1 root root 254, 10 29 ago 18:16 /dev/mapper/volumeGroup-base | 124 | brw------- 1 root root 254, 10 29 ago 18:16 /dev/mapper/volumeGroup-base |
125 | |||
126 | |||
127 | How to determine when a merging is complete | ||
128 | =========================================== | ||
129 | The snapshot-merge and snapshot status lines end with: | ||
130 | <sectors_allocated>/<total_sectors> <metadata_sectors> | ||
131 | |||
132 | Both <sectors_allocated> and <total_sectors> include both data and metadata. | ||
133 | During merging, the number of sectors allocated gets smaller and | ||
134 | smaller. Merging has finished when the number of sectors holding data | ||
135 | is zero, in other words <sectors_allocated> == <metadata_sectors>. | ||
136 | |||
137 | Here is a practical example (using a hybrid of lvm and dmsetup commands): | ||
138 | |||
139 | # lvs | ||
140 | LV VG Attr LSize Origin Snap% Move Log Copy% Convert | ||
141 | base volumeGroup owi-a- 4.00g | ||
142 | snap volumeGroup swi-a- 1.00g base 18.97 | ||
143 | |||
144 | # dmsetup status volumeGroup-snap | ||
145 | 0 8388608 snapshot 397896/2097152 1560 | ||
146 | ^^^^ metadata sectors | ||
147 | |||
148 | # lvconvert --merge -b volumeGroup/snap | ||
149 | Merging of volume snap started. | ||
150 | |||
151 | # lvs volumeGroup/snap | ||
152 | LV VG Attr LSize Origin Snap% Move Log Copy% Convert | ||
153 | base volumeGroup Owi-a- 4.00g 17.23 | ||
154 | |||
155 | # dmsetup status volumeGroup-base | ||
156 | 0 8388608 snapshot-merge 281688/2097152 1104 | ||
157 | |||
158 | # dmsetup status volumeGroup-base | ||
159 | 0 8388608 snapshot-merge 180480/2097152 712 | ||
160 | |||
161 | # dmsetup status volumeGroup-base | ||
162 | 0 8388608 snapshot-merge 16/2097152 16 | ||
163 | |||
164 | Merging has finished. | ||
165 | |||
166 | # lvs | ||
167 | LV VG Attr LSize Origin Snap% Move Log Copy% Convert | ||
168 | base volumeGroup owi-a- 4.00g | ||