[linux-lvm] Snapshots and disk re-use

Jonathan Tripathy jonnyt at abpni.co.uk
Thu Feb 24 14:57:27 UTC 2011


On 24/02/11 14:50, Stuart D. Gathman wrote:
> On Thu, 24 Feb 2011, Jonathan Tripathy wrote:
>
>>>> However the origin will be written to as it will be in use...
>>> There were 3 cases of what you might be asking.  One of the 3 cases was:
>>> If you are taking snapshots for backup, then it was suggested to zero the
>>> *-cow (which will have any blocks written to the origin since the snapshot
>>> was taken) before deleting the snapshot.  However, I wasn't sure if this
>>> was safe to while the origin is mounted, since writes to the origin consult
>>> the *-cow to see whether origin blocks need to be copied before begin
>>> overwritten.
>> But I want to keep this data. As the data written to the origin while a
>> respective snapshot is in use would be data during normal operation of a
>> customer VPS.
>>
>> All I want to do is make sure that my use of snapshot for backup purposes (to
>> rsync the snapshot to a remote server) doesn't leave loose data lying anywhere
>> on physical disk.
> Yes. To be more pedantic, the COW has copies of the original contents
> of blocks written to the origin since the snapshot.  That is why you
> need to clear it to achieve your stated purpose.  The origin blocks
> are written normally to the *-real volume (you can see these in
> the /dev/mapper directory).
But didn't you say that there is only one copy of the files stored 
physically on disk?
> I am only concerned that since the COW has both the saved origin blocks, and a
> table of which blocks from the origin have been saved, that clearing
> the table might cause problems for an active origin.  It should be safe
> with the origin unmounted (but having to shutdown the VM defeats the
> purpose of a snapshot!)  I am hoping an expert will weigh in.
>




More information about the linux-lvm mailing list