On Wed, Jan 30, 2008 at 05:25:03PM -0600, Eric Sandeen wrote: > The anaconda folks are now using blkid instead of hand-rolled > tests for filesystem type at install time, but they had one > more request: > > Bugzilla Bug 409321: RFE: information on blkdevs "formatted" as PVs > https://bugzilla.redhat.com/show_bug.cgi?id=409321 > > The attached patch does the right thing for me on my sample > set of exactly 1 PV... > > Any issues with reporting back something which is not actually > a filesystem ("lvm2pv") ? > > [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 The patch works for me, but it would seem the right thing would be print the UUID without the hyphens, i.e.: guOQGdcOE3IafCm0190XkPZTy5fCEanQ instead of guOQGd-cOE3-IafC-m019-0XkP-ZTy5-fCEanQ After all, pvscan prints it with the hyphens, and blkid returns uuid's with the hyphens for other filesystems as well. And removing the hyphens aren't hard; "tr -d -" will do it. It's not that hard to convert from one to the other; this will do it: for (i=0, b=1, p=uuid, q=label->pv_uuid; i <= 32; i++, b = b << 1) { if (b & 0x4444440) *p++ = '-'; *p++ = *q++; } This shouldn't screw up the anaconda folks, since they just need to know the filesystem type, right? That's all vol_id seems to return in any case. - Ted - To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html