device mapper, snapshots, and merging
am 15.04.2011 07:07:40 von Michael SallawayHi linux-raid,
I'm not sure if this is the best forum to ask, but I figured it's a
result of a RAID issue, and people here have probably tried something
similar in the past. :-)
I had array integrity issues in the last few days, and I'm in the
process of fixing it all up. I'm using LVM to allocate the array (a
12-drive RAID-6).
To test the recovery efforts to ensure nothing too crazy will happen,
I've made device-mapper copy-on-write snapshots of the filesystems that
I'm running fsck over. Most of the filesystems are fine, and if I have
problems I check if it will be OK before re-running the fsck again on
the underlying (real) device. However, the largest volume has taken 24
hours so far in the fsck (and I'm expecting probably 48, at this rate),
so I don't want to have to rerun it all over again on the underlying device.
So, my question is, how do I merge that back to the underlying device
from the snapshot?
I've been reading the kernel documentation
(http://www.kernel.org/doc/Documentation/device-mapper/snaps hot.txt),
and I see the 'snapshot-merge' target, but I'm not 100% clear on what I
should do with it. At the moment, my table definition for the COW
snapshot is:
0 25868894208 snapshot /dev/vg_data/data /dev/loop2 p 64
(where /dev/loop2 is the zero'd file that I'm using as a COW buffer).
If I understand it correctly, do I stop the device-mapper device
(`dmsetup remove cow-data`), and then change the table entry to:
0 25868894208 snapshot-merge /dev/vg_data/data /dev/loop2 p 64
then create the device again (`dmsetup create cow-data
If so, how do I know when all the changes get merged? when do I stop the
COW device, and resume using the real device?
Thanks in advance for any pointers anyone can give. I appreciate the
help, and if I'm in the wrong list, please let me know the best place to
ask. :-)
Cheers,
Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html