Bug 409321 - RFE: information on blkdevs "formatted" as PVs
Summary: RFE: information on blkdevs "formatted" as PVs
Alias: None
Product: Fedora
Classification: Fedora
Component: e2fsprogs
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Eric Sandeen
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2007-12-03 20:39 UTC by Jeremy Katz
Modified: 2008-10-15 15:37 UTC (History)
2 users (show)

Fixed In Version: 1.40.7-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-02-29 16:45:55 UTC
Type: ---

Attachments (Terms of Use)

Description Jeremy Katz 2007-12-03 20:39:45 UTC
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

Comment 1 Eric Sandeen 2007-12-03 23:39:54 UTC
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.

Comment 2 Jeremy Katz 2007-12-04 00:02:19 UTC
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

Comment 3 Eric Sandeen 2007-12-04 02:52:02 UTC
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.

Comment 4 Eric Sandeen 2008-01-30 23:25:56 UTC
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                               
  /dev/sda2  guOQGd-cOE3-IafC-m019-0XkP-ZTy5-fCEanQ


Comment 5 Eric Sandeen 2008-02-29 16:45:55 UTC
On its way to rawhide via e2fsprogs-1.40.7-1

From the changelog:

Teach blkid to detect LVM2 physical volumes.  (Addresses Red Hat
Bugzilla: #409321)

Comment 6 Eric Sandeen 2008-10-15 15:14:45 UTC
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)
        if buf.startswith("HM"):
            return "physical volume (LVM)"


Comment 7 Jeremy Katz 2008-10-15 15:37:39 UTC
We use it but we also have a fallback for older libblkid.  Which we can probably remove post-F10

Note You need to log in before you can comment on or make changes to this bug.