Re: New Solaris 7 features

MOLNAR Ingo (mingo@chiara.csoma.elte.hu)
Wed, 11 Nov 1998 02:09:16 +0100 (CET)


On Tue, 10 Nov 1998, Malcolm Beattie wrote:

> While I'm here: an idea for providing a snapshot capability to any
> block device (allowing you to snapshot then backup any fs you like).

this is a planned feature of the MD based LVM personality i'm working on.
The prototype of the LVM is already in the latest MD patch
(http://www.kernel.org/pub/linux/daemons/raid/alpha/), the snapshot
feature will probably show up in the next release. (in a few days)

> A fake block device /dev/snap which you connect to the
> device-to-be-snapshotted on one side and to a spare block device on
> the other side (either a spare partition or a /dev/loop on a file).

the snapshotted device does a 'copy-out' to a 'store old contents' device
for every (block) write after the snapshot time. The 'old contents' device
is some scratch partition or an on-demand-storage LVM device. (ie. if the
device runs out of space, it will not fail, it can self-extend itself)

> snap keeps a dirty bitmap and a sparse block structure on the spare
> block device. Writes to snap mark the block in the dirty bitmap and
> store the original block in the sparse structure. Reads from snap
> check the dirty bitmap and read from the original or the sparse block
> map.

we do not want to write to the 'snap'. We want to use the 'snapshot
device' to carry a snapshot for some limited (or unlimited) time, eg. for
backup purposes. This thing is completely transparent to the 'normal'
device.

-- mingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/