Skip to contentSkip to conversation

rw-snapshot as an addition for lvm

linux-lvm Anders Henke 3 participants 4 messages Jul 28, 2001 – Jul 30, 2001

lore
Share & tools
lore
#0 lore raw

Hi,

Currently, you take a snapshot from a logical volume and define a bufferlimit after which the snapshot becomes invalid. As long as this limit has not been reached, the snapshot is mountable as a readonly device.

Since journaled filesystems see a unclean fs, they do want to replay their journal - which currently fails if the fs has not been prepared for exactly this case where their unclean fs resides on a readonly-volume.

I think it's also quite interesting to have a rw-snapshot in which changes of both real and snapshot are being written to a smaller bufferspace on disk:
the snapshot always represents the state of the LV when taking the snapshot, but permits changes on 'its copy'.

However, if you're changing data on snapshot or original lv, this bufferspace has to be used to keep the snapshot 'old' (to the time of snapshotting the lv) as well as current (when you're writing to your snapshot). When the bufferspace fills up, the snapshot has to return a 'disk full'-error at some point and finally becomes invalid when too much data has been altered.

With such a function you might
-replay a journaled fs without changes for the journaled fs.
So if I want to use a snapshot for backup, I don't have to take down the fs before snapshotting it or applying patches to a kernel release you don't yet prefer on your systems.

-put a snapshotted database back online and perform e.g. perform
additional integrity checks (if the system really came down clean before the snapshot has been performed or you've just a bad timing) before doing a tape backup of the snapshots files.

-doing 'critical' or development work on a testbed without altering the
original system, e.g. test if e2fsck will unlink your critical files or you'd better try to copy them from the unclean fs.
Or just to learn 'how can I manually try to recover this system in case the vendor-supplied check fails'.

What do you think about such a system?

Anders

Signature · 3 lines
Schlund + Partner AG              System Administration and Security
Erbprinzenstrasse 4-12            v://49.721.91374.50
D-76133 Karlsruhe                 f://49.721.91374.212
#1 lore raw
Quoted 4 lines · Anders Henke

I think it's also quite interesting to have a rw-snapshot in which changes of both real and snapshot are being written to a smaller bufferspace on disk:
the snapshot always represents the state of the LV when taking the snapshot, but permits changes on 'its copy'.

See other thread in the last few days on rw snapshots; Yes, it's an execellent idea.

- Joe

#2 lore raw

The question I would have is whether rw-snapshots (or, snapshots in general), should be implemented in LVM or as a separate driver/layer. In that case, a snapshot could be taken of any block device, not only of a logical volume.

Another interesting feature that I might add that would be handy here is the "dynamic LV". This would be a LV that can extend dynamically if so requested. The advantage of this would be that you could use the dynamic LV as the buffer space of a snapshot. If the snapshot requires more space, the LV could extend dynamically to allow for this....

++Jos

And thus it came to pass that Joe Thornber wrote:
(on Mon, Jul 30, 2001 at 10:57:26AM +0100 to be exact)

Quoted 15 lines · Anders Henke
Quoted 4 lines

I think it's also quite interesting to have a rw-snapshot in which changes of both real and snapshot are being written to a smaller bufferspace on disk:
the snapshot always represents the state of the LV when taking the snapshot, but permits changes on 'its copy'.

See other thread in the last few days on rw snapshots; Yes, it's an execellent idea.

- Joe
_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

Signature · 1 line
Im verzeihen des Unverzeihlichen ist der Mensch der gottlichen Liebe am n�chtsten.
#3 lore raw
Quoted 4 lines · Jos Visser

The question I would have is whether rw-snapshots (or, snapshots in general), should be implemented in LVM or as a separate driver/layer. In that case, a snapshot could be taken of any block device, not only of a logical volume.

Yes, I've already raised this issue... and written a new standalone driver, which will go into experimental soon :) There's a similar argument that multi-pathing is standalone.

Quoted 6 lines

Another interesting feature that I might add that would be handy here is the "dynamic LV". This would be a LV that can extend dynamically if so requested. The advantage of this would be that you could use the dynamic LV as the buffer space of a snapshot. If the snapshot requires more space, the LV could extend dynamically to allow for this....

There are facilities for monitoring snapshot usage. You could easily write a script that extends the lv when it hits, say, 90 % full.

- Joe

Quoted 29 lines

++Jos

And thus it came to pass that Joe Thornber wrote:
(on Mon, Jul 30, 2001 at 10:57:26AM +0100 to be exact)

Quoted 15 lines · Anders Henke
Quoted 4 lines

I think it's also quite interesting to have a rw-snapshot in which changes of both real and snapshot are being written to a smaller bufferspace on disk:
the snapshot always represents the state of the LV when taking the snapshot, but permits changes on 'its copy'.

See other thread in the last few days on rw snapshots; Yes, it's an execellent idea.

- Joe
_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

Signature · 6 lines
Im verzeihen des Unverzeihlichen ist der Mensch der gottlichen Liebe am ndchtsten.
_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html