[linux-lvm] Snapshots and disk re-use

Stuart D. Gathman stuart at bmsi.com
Wed Feb 23 19:34:11 UTC 2011

On Wed, 23 Feb 2011, Jonathan Tripathy wrote:

> On 23/02/11 17:54, Stuart D. Gathman wrote:
> > On Wed, 23 Feb 2011, Jonathan Tripathy wrote:
> >
> > > > 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.
> > So you're not worried about the security implication of leftovers in free
> > space, and just want a base image to clone for new customers?
> Yes I am. This is exactly what I'm worried about. I just need to know how to
> zero out any "left over" bits of data that would be left over after removing a
> snapshot. I use snapshots for backing up a volume (by running rsync against
> the snapshot to a remote server)

If the origin is not mounted, you can just copy /dev/zero to the *-cow, then
delete the snapshot.  I am a little concerned whether that is safe while the
origin is mounted, however.  Perhaps an LVM expert can elucidate.

	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

More information about the linux-lvm mailing list