Bug 618969

Summary: udev doesn't recognize partitions on discs other than the first
Product: [Fedora] Fedora Reporter: DirkReiners <spam>
Component: udevAssignee: Harald Hoyer <harald>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 13CC: harald, jonathan
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-29 04:41:27 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description DirkReiners 2010-07-28 04:39:34 EDT
Description of problem:

udev doesn't recognize partitions on discs other than the first, and doesn't create device nodes for them, preventing them from being mounted. Manually creating them after boot doesn't seem to work either. :(

Example:
# fdisk -l 

Disk /dev/sda: 80.0 GB, 80026361856 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1275    10240000   83  Linux
/dev/sda2   *        1275        5737    35838976    7  HPFS/NTFS
/dev/sda3            5737        6247     4096000   83  Linux
/dev/sda4            6248        9729    27969165    5  Extended
/dev/sda5            6248        9729    27968512   83  Linux

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      156651  1258299126   83  Linux
/dev/sdb2          156652      182401   206836875    7  HPFS/NTFS

Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      156651  1258299126   83  Linux
/dev/sdc2          156652      182401   206836875   83  Linux


# ls -l /dev/sd*
brw-rw----. 1 root disk 8,  0 Jul 28 01:37 /dev/sda
brw-rw----. 1 root disk 8,  1 Jul 28 01:37 /dev/sda1
brw-rw----. 1 root disk 8,  2 Jul 28 01:37 /dev/sda2
brw-rw----. 1 root disk 8,  3 Jul 28 01:37 /dev/sda3
brw-rw----. 1 root disk 8,  4 Jul 28 01:37 /dev/sda4
brw-rw----. 1 root disk 8,  5 Jul 28 01:37 /dev/sda5
brw-rw----. 1 root disk 8, 16 Jul 28 01:37 /dev/sdb
brw-rw----. 1 root disk 8, 32 Jul 28 01:37 /dev/sdc


# mknod -m 660 /dev/sdc2 b 8 34
# ls -l /dev/sdc*
brw-rw----. 1 root disk 8, 32 Jul 28 01:37 /dev/sdc
brw-rw----. 1 root root 8, 34 Jul 28 03:35 /dev/sdc2
# mount -t ext4 /dev/sdc2 /tmp/q
mount: /dev/sdc2 is not a valid block device



How reproducible:
Not totally sure, just happened to me after upgrading from F11, which worked fine on the same system.


Log excerpt:
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:06.0/host0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:06.0/host0/scsi_host/host0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:06.0/host0/target0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:06.0/host0/target0:0:0/0:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:06.0/host0/target0:0:0/0:0:0:0/block/sr0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db file data
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:06.0/host0/target0:0:0/0:0:0:0/bsg/0:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db symlink data '/dev/bsg/0:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:06.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:06.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db symlink data '/dev/sg0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:06.0/host1'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:06.0/host1/scsi_host/host1'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db file data
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host2'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host2/scsi_host/host2'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host2/target2:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host2/target2:0:0/2:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host2/target2:0:0/2:0:0:0/block/sda'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db file data
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host2/target2:0:0/2:0:0:0/block/sda/sda1'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db file data
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host2/target2:0:0/2:0:0:0/block/sda/sda2'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db file data
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host2/target2:0:0/2:0:0:0/block/sda/sda3'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db file data
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host2/target2:0:0/2:0:0:0/block/sda/sda4'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db file data
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host2/target2:0:0/2:0:0:0/block/sda/sda5'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db file data
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host2/target2:0:0/2:0:0:0/bsg/2:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db symlink data '/dev/bsg/2:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host2/target2:0:0/2:0:0:0/scsi_device/2:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host2/target2:0:0/2:0:0:0/scsi_disk/2:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host2/target2:0:0/2:0:0:0/scsi_generic/sg1'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db symlink data '/dev/sg1'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host3'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host3/scsi_host/host3'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host3/target3:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host3/target3:0:0/3:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host3/target3:0:0/3:0:0:0/block/sdb'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db file data
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host3/target3:0:0/3:0:0:0/bsg/3:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db symlink data '/dev/bsg/3:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host3/target3:0:0/3:0:0:0/scsi_device/3:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host3/target3:0:0/3:0:0:0/scsi_disk/3:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:07.0/host3/target3:0:0/3:0:0:0/scsi_generic/sg2'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db symlink data '/dev/sg2'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db file data
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host4'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host4/scsi_host/host4'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host4/target4:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host4/target4:0:0/4:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host4/target4:0:0/4:0:0:0/block/sr1'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db file data
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host4/target4:0:0/4:0:0:0/bsg/4:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db symlink data '/dev/bsg/4:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host4/target4:0:0/4:0:0:0/scsi_device/4:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host4/target4:0:0/4:0:0:0/scsi_generic/sg3'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db symlink data '/dev/sg3'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host5'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host5/scsi_host/host5'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host5/target5:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host5/target5:0:0/5:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host5/target5:0:0/5:0:0:0/block/sdc'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db file data
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host5/target5:0:0/5:0:0:0/bsg/5:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db symlink data '/dev/bsg/5:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host5/target5:0:0/5:0:0:0/scsi_device/5:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host5/target5:0:0/5:0:0:0/scsi_disk/5:0:0:0'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 has devpath '/devices/pci0000:00/0000:00:08.0/host5/target5:0:0/5:0:0:0/scsi_generic/sg4'
Jul 28 01:38:06 localhost udevadm[1616]: device 0x12eff30 filled with db symlink data '/dev/sg4'


No clue how to continue from here...

Thanks!
Comment 1 DirkReiners 2010-07-29 00:42:53 EDT
After another day of looking around I found the problem.

I had originally used the discs for a RAID, so the whole disc had an old RAID superblock. On F11 that didn't seem to be a problem, but with F13 it looks like the priorities changed and the partitions were ignored. blkid just showed linux_raid_member for the whole disc.

Interestingly just going into fdisk and rewriting the superblock (without changing anything) fixed it, but only until the next reboot. Not sure if this counts as a bug, and not sure which subsystem this would belong to.

The actual fix was to use mdadm --zero-superblock to get rid of the superblock on the disc. Thanks to http://kerneltrap.org/mailarchive/linux-raid/2010/5/22/6885140for the solution.