[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH v3 1/2] NEW API: add a new api wipefs

On Wed, Feb 08, 2012 at 01:32:47PM +0800, Wanlong Gao wrote:
> Add the new api wipefs to erase the filesystem signatures
> on a device but now erase any data.

Having had a bit of time to think about this, I think this comment is

> -guestfs_zero should use wipefs.  See wipefs(8).

wipefs is generally better (than "zero") in that it knows about what's
on the disk (via blkid) and only overwrites the minimum necessary to
remove partition tables, RAID signatures etc.  This is good.

What's bad is that: (1) It probably doesn't work for formats that
blkid doesn't understand.  (2) It doesn't preserve sparseness,
although arguably that doesn't matter because it's only overwriting
stuff that should be non-zero already.

Cf: libblkid/src/probe.c:blkid_do_wipe

On balance, I think that changing guestfs_zero to use wipefs is a
better way to approach this, but I'm open to opinions on this ...


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]