]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: try to detect if PT is newer than LVM
authorKarel Zak <kzak@redhat.com>
Thu, 24 Feb 2011 13:03:44 +0000 (14:03 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 24 Feb 2011 13:21:11 +0000 (14:21 +0100)
commit8b7eae458ccb04befb579dc87bdbfc1b6cbd5553
tree695dbee4e53285980b460fac2852bb085bd5c0fa
parent947a7c9ca53a679bdbdafd600a5ad4a3b9b26c4c
libblkid: try to detect if PT is newer than LVM

LVM (pvcreate) wipes the begin of the device. If there is a PT in the
wiped area then LVM signature is obsolete.

 # pvcreate /dev/sdb
 # fdisk /dev/sdb

old version:
 # blkid -p -o udev /dev/sdb
 ID_FS_TYPE=LVM2_member

new version:
 # blkid -p -o udev /dev/sdb
 ID_PART_TABLE_TYPE=dos

Reported-by: Matej Cepl <mcepl@redhat.com>
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=679799
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/blkidP.h
shlibs/blkid/src/partitions/dos.c
shlibs/blkid/src/partitions/gpt.c
shlibs/blkid/src/partitions/partitions.c
shlibs/blkid/src/probe.c
shlibs/blkid/src/superblocks/lvm.c