Red Hat Bugzilla – Bug 409321
RFE: information on blkdevs "formatted" as PVs
Last modified: 2008-10-15 11:37:39 EDT
In switching anaconda to using libblkid, most things seem to be working quite
well. One thing that isn't quite correct, though is that if a device has a PV
on it, it is shown as having no filesystem. I suspect the same would be true,
eg, for mdadm on top of dmraid (which is kind of nutty, but still, I'm sure
someone does it).
For all intents and purposes, these block devices do have a "filesystem" -- it
just happens to be one that you can't mount. Would be nice to be able to get
that info with libblkid rather than having to still check that in anaconda
Hm, while I can get this hooked up quickly in libblkid, by looking for "LVM2"
magic, I met with *very* strong resistance from the lvm folks (well, agk) who
said, among other things:
<agk_> - no way reimplement detection in that lib (libblkid), and lvm2's lib is
not available yet
<agk_> having the LVM2 signature is not definitive
So this has scared me off just a bit :)
How much worse would it be to shell out and run "pvs" ? I guess that's the one
true definitive answer, today.
Having the signature is just as definitive as all the other filesystem type
detection that's done in libblkid.
There's no way we're going to run pvs to determine this. Worst case, we'll just
continue to carry
My bigger concern was the statement that the "LVM2" magic isn't definitive...
You know, in the bigger picture, we could use a library that also knows how to
wipe all other old signatures; frankly I'm surprised blkid can get it right very
often with various old things lying around...
I'll still run it by Ted.
Sent the patch upstream for review (finally, sorry for the delay...)
[root@host]# misc/blkid -c /dev/null /dev/sda2
/dev/sda2: UUID="guOQGdcOE3IafCm0190XkPZTy5fCEanQ" TYPE="lvm2pv"
[root@host]# pvs -o pv_name,pv_uuid
PV PV UUID
On its way to rawhide via e2fsprogs-1.40.7-1
From the changelog:
Teach blkid to detect LVM2 physical volumes. (Addresses Red Hat
Just FWIW, I noticed that anaconda isn't using this yet:
# FIXME: libblkid doesn't show physical volumes as having a filesystem
# so let's sniff for that.(#409321)
return "physical volume (LVM)"
We use it but we also have a fallback for older libblkid. Which we can probably remove post-F10