1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00
lvm2/lib/device
Peter Rajnoha eaa23d3273 wiping: add support for blkid wiping
This is actually the wipefs functionailty as a matter of fact
(wipefs uses the same libblkid calls).

libblkid is more rich when it comes to detecting various
signatures, including filesystems and users can better
decide what to erase and what should be kept.

The code is shared for both pvcreate (where wiping is necessary
to complete the pvcreate operation) and lvcreate where it's up
to the user to decide.

The verbose output contains a bit more information about the
signature like LABEL and UUID.

For example:
  raw/~ # lvcreate -L16m vg
  WARNING: linux_raid_member signature detected on /dev/vg/lvol0 at offset 4096. Wipe it? [y/n]

or more verbose one:
  raw/~ # lvcreate -L16m vg -v
  ...
     Found existing signature on /dev/vg/lvol0 at offset 4096: LABEL="raw.virt:0" UUID="da6af139-8403-5d06-b8c4-13f6f24b73b1" TYPE="linux_raid_member" USAGE="raid"
WARNING: linux_raid_member signature detected on /dev/vg/lvol0 at offset 4096. Wipe it? [y/n]

The verbose output is the same output as found in blkid.
2013-11-27 15:49:15 +01:00
..
dev-cache.c dev-cache.c: Make dev_name a little more robust. 2013-11-17 22:34:56 +01:00
dev-cache.h filters: dump filter returns error code 2013-06-03 08:42:25 +02:00
dev-io.c gcc: replace #ifdef linux with __linux__ 2013-11-13 13:56:29 +00:00
dev-luks.c device: cleanup signature wiping functions 2013-11-27 12:56:58 +01:00
dev-md.c device: cleanup signature wiping functions 2013-11-27 12:56:58 +01:00
dev-swap.c device: cleanup signature wiping functions 2013-11-27 12:56:58 +01:00
dev-type.c wiping: add support for blkid wiping 2013-11-27 15:49:15 +01:00
dev-type.h wiping: add support for blkid wiping 2013-11-27 15:49:15 +01:00
device-types.h filters: Add NVM Express (nvme). 2013-10-09 20:08:07 +01:00
device.h refactor: make device type recognition code common for general use 2013-06-12 12:08:56 +02:00