[linux-lvm] snapshot reset

Bastian Blank bastian at waldi.eu.org
Thu Mar 17 07:43:45 UTC 2005


On Wed, Mar 16, 2005 at 11:10:00PM +0000, Alasdair G Kergon wrote:
> On Thu, Mar 17, 2005 at 12:00:40AM +0100, Bastian Blank wrote:
> > Is it possible to reset a snapshot without a delete, create cycle?
> Not sure if I'm answering the right question, but with
> LVM2/device-mapper:

Yes, you were answering the right questions.

> You have to suspend & resume it in the kernel [with existing device-mapper
> implementation; this may change].
> 
> With LVM2, between those commands, you can just zero out the
> start of the cow device (say first 64k).  And then it'll treat
> it as if it were a new snapshot (based on current state of filesystem.)

Something like this?
| name=${vg}-${lv}
| dmsetup suspend $name
| dd if=/dev/zero of=/dev/mapper/${name}-cow bs=64k count=1
| dmsetup resume $name

Is it possible to implement that somewhere in the lvm commands?

Bastian

-- 
Power is danger.
		-- The Centurion, "Balance of Terror", stardate 1709.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20050317/400bf712/attachment.sig>


More information about the linux-lvm mailing list