Red Hat Bugzilla – Bug 400321
blkid does not scan raw block device
Last modified: 2008-02-15 21:12:14 EST
Description of problem:
I have used dm-crypt with LUKS on an entire hard disc connected via an
external USB drive bay.
blkid does not attempt to identify the hard disc.
This worked fine in F7.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
# cat /proc/partitions
major minor #blocks name
8 0 78150744 sda
8 1 104391 sda1
8 2 78043770 sda2
8 16 732574584 sdb
253 0 10485760 dm-0
253 1 2097152 dm-1
(sdb is a 750 GB hard disc used for backups with dm-crypt (LUKS).
# cryptsetup luksUUID /dev/sdb
# blkid -c /dev/null -t UUID=a3f9a41b-e3ab-4620-9d29-4e6e7f44b0a1
# blkid | grep sdb
# blkid | grep -i a3f9a41b-e3ab-4620-9d29-4e6e7f44b0a1
No joy :(
strace indicates that blkid does not attempt to even open /dev/sdb
For it to find the device.
Attached is the strace output of:
blkid -c /dev/null -t UUID=a3f9a41b-e3ab-4620-9d29-4e6e7f44b0a1
Created attachment 269391 [details]
strace of blkid
I know about this bug. I found the bug when I read libblkid code few weeks ago.
Sorry, forgot to fill BZ.
The problem is in devname.c, probe_all(); where is heuristic that doesn't work
correctly with unpartitioned disks when the disk is followed by another
device<n>. For example:
Created attachment 269931 [details]
I think this should address the issue... hopefully without breaking anything
Karel, care to give it a look-over, since you've recently read this code as
well? With that much review I'll send it up to Ted. :)
Seems good. Go ahead ;-)
patch is upstream now, I'll get it to e2fsprogs for fedora soon
e2fsprogs-1.40.4-1.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.