Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.19]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p1NGtdUc028345 for ; Wed, 23 Feb 2011 11:55:39 -0500 Received: from abpni.co.uk (host-92-27-106-173.static.as13285.net [92.27.106.173] (may be forged)) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1NGtQNZ021022 for ; Wed, 23 Feb 2011 11:55:27 -0500 Message-ID: <4D653BEF.5010600@abpni.co.uk> Date: Wed, 23 Feb 2011 16:55:11 +0000 From: Jonathan Tripathy MIME-Version: 1.0 References: <4D64FF3C.6080602@abpni.co.uk> <1298466573.19562.147.camel@ubuntu> <4D65124C.1070505@abpni.co.uk> <1298470564.19562.150.camel@ubuntu> <4D651735.1000802@abpni.co.uk> <20110223101259.77143753@bettercgi.com> In-Reply-To: <20110223101259.77143753@bettercgi.com> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Snapshots and disk re-use Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: LVM general discussion and development On 23/02/11 16:12, Ray Morris wrote: > On 23/02/11 14:16, Joe Thornber wrote: >> And how do I zero just exception store? > > In this example, the normal lv is c1_s1. > It has two snapshots, c1_s1_snap0 and c1_s1_snap1. > > List the underlying volumes like so: > > [root@clonebox2 ~]# ls -1 /dev/mapper/clones-c1_s1* > /dev/mapper/clones-c1_s1 > /dev/mapper/clones-c1_s1-real > /dev/mapper/clones-c1_s1_snap0 > /dev/mapper/clones-c1_s1_snap0-cow > /dev/mapper/clones-c1_s1_snap1 > /dev/mapper/clones-c1_s1_snap1-cow > > Half of those would be hidden to lvdisplay, though the man > page will probably tell you how to show hidden LVs. "ls" > shows them all. > > c1_s1_snap0-cow and c1_s1_snap1-cow are the copy on write > volumes, the exception stores, I believe. -real is where > the current data lives, and c1_s1, the "main" LV is a basically > a proxy which reads directly from -rela, but diverts writes > so that old data is copied to -cow. -snap0 is a proxy which > reads from either -cow or -real as needed. Hopefully someone > will tell me where I'm wrong, if I am. > > Zeroing c1_s1 first, then c1_s1_snap0-cow would zero everything, Thanks for the explanation. But what if I don't want to zero everything? I only want to return everything back to the state it was before I created the snapshot.