I think I understand some of the lvm snapshot concept, but am confused about one last thing. After you take the snapshot, if you don't mount it, will it be active? What I really want to know is will it be written to/changed to match changes made to the original? I am confused about the performance hit due to the writes/copys that occur when you have an active snapshot. Does it mean that the snapshot it basically empty/a direct copy of the original until a write operation, and then the original block from the original logical volume is actually written to the snapshot for the sake of being able to revert?
Asked
Active
Viewed 250 times
1 Answers
1
LVM snapshots are block-level snapshots. So whether you mount them or not, they will have the same impact on the performance of your system
They are, as you guessed, copy-on-write snapshots, so they will never change. When a block changes, a copy is made. This also means that initially a snapshot takes up no addditional space, but as time progresses, space used for keeping the snapshot will grow until the snapshot is destroyed (unmounting does not destroy a snapshot).
Also caused by the copy-on-write is the performance hit caused by all this extra copying (writing a single byte may cause an entire block to be read and copied). Depending on your application's behavior, this performance hit may be acceptable or not, or not even visible at all.
Dennis Kaarsemaker
- 19,819