[linux-lvm] exposing snapshot block device

Zdenek Kabelac zkabelac at redhat.com
Wed Nov 6 09:22:25 UTC 2019


Dne 05. 11. 19 v 21:56 Tomas Dalebjörk napsal(a):
> Thanks,
> 
> That really helped me to understand how the snapshot works.
> Last question:
> - lets say that block 100 which is 1MB in size is in the cow device, and a 
> write happen that wants to something or all data on that region of block 100.
> Than I assume; based on what have been previously said here, that the block in 
> the cow device will be overwritten with the new changes.

Yes - it needs to be written to 'COW' device - since when the block will be 
merged - it would overwrite whatever would have been written in 'origin'
(as said - there is nothing else in snapshot metadata then  'from->to' block 
mapping table - so there is no way to store information about a portion of 
'chunk' being already written into origin) - and 'merge' needs to work 
reliable in cases like 'power-off' in the middle of merge operation...

Regards

Zdenek




More information about the linux-lvm mailing list