James,
That's fantastic! Thanks very much! I have a couple of questions:
1) If I wanted to create a script that backed up lots of customer-data
LVs, could I just do one zero at the end (and still have no data
leakage)?
Yes you could, because COW means COPY ON WRITE, so the original block is
copied onto the COW with the data from the original disk overwritting
any data currently on it. Before that point any data on it was not
addressable from the snapshot lv (* see my final point)
2) On average, each of my data LVs are 20GB each, and if I were to
create a snapshot of 20GB, this would take about 20 mins to erase. If
I made the snapshot only 1GB, that means it would be quick to erase at
the end (however only 1GB of data could be created on the respect
origin, correct?)
You are right you only have to erase the snapshot cow space, which is
normally only 10-15% of the whole original disk. 2GB is pretty fast to
over right on any system I have used these days. To be sure though you
do need to overwrite the whole cow even if only a few percent was used
as you cannot tell which few percent that was.
* I do wonder why you are so worried, leakage is only a problem if the
COW is assigned to a future customer LV. If you always used the same
space for backups perhaps had a PE just for backups it would never be
used in a customer lv therefore you could argue that you never have to
erase it. If its on a pe you only use for snapshotting you also don't
need to hog the space as any bit of that disk is ok.
James
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/