Bug 400321 - blkid does not scan raw block device
Summary: blkid does not scan raw block device
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: e2fsprogs
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Eric Sandeen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-26 23:53 UTC by Anchor Systems Managed Hosting
Modified: 2008-02-16 02:12 UTC (History)
2 users (show)

Fixed In Version: 1.40.4-1.fc8
Clone Of:
Environment:
Last Closed: 2008-02-16 02:12:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
strace of blkid (14.01 KB, text/plain)
2007-11-26 23:53 UTC, Anchor Systems Managed Hosting
no flags Details
proposed change (1.74 KB, patch)
2007-11-27 17:42 UTC, Eric Sandeen
no flags Details | Diff

Description Anchor Systems Managed Hosting 2007-11-26 23:53:15 UTC
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):
1.40.2-10.fc8

How reproducible:
100%

Steps to Reproduce:
1.
# 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).
2.
# cryptsetup luksUUID /dev/sdb
a3f9a41b-e3ab-4620-9d29-4e6e7f44b0a1

3.
# blkid -c /dev/null -t UUID=a3f9a41b-e3ab-4620-9d29-4e6e7f44b0a1
# blkid | grep sdb
# blkid | grep -i a3f9a41b-e3ab-4620-9d29-4e6e7f44b0a1

Actual results:
No joy :(

strace indicates that blkid does not attempt to even open /dev/sdb

Expected results:
For it to find the device.

Additional info:
Attached is the strace output of:
blkid -c /dev/null -t UUID=a3f9a41b-e3ab-4620-9d29-4e6e7f44b0a1

Comment 1 Anchor Systems Managed Hosting 2007-11-26 23:53:15 UTC
Created attachment 269391 [details]
strace of blkid

Comment 2 Karel Zak 2007-11-27 00:26:11 UTC
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:

  sda
  loop0



Comment 3 Eric Sandeen 2007-11-27 17:42:30 UTC
Created attachment 269931 [details]
proposed change

I think this should address the issue... hopefully without breaking anything
else.

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.  :)

Thanks,
-Eric

Comment 4 Karel Zak 2007-11-27 20:27:09 UTC
Seems good. Go ahead ;-)

Comment 5 Eric Sandeen 2007-11-30 04:50:14 UTC
Sent upstream:
http://marc.info/?l=linux-ext4&m=119636478426226&w=2

Comment 6 Eric Sandeen 2007-12-17 17:23:01 UTC
patch is upstream now, I'll get it to e2fsprogs for fedora soon

http://git.kernel.org/?p=fs/ext2/e2fsprogs.git;a=commitdiff;h=38361bbbb55735cf0f4ed6d56079c70fb3328036


Comment 7 Fedora Update System 2008-02-16 02:12:08 UTC
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.


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