Bug 457629

Summary: Kernel does not read partition table
Product: [openSUSE] openSUSE 11.1 Reporter: Petr Uzel <puzel>
Component: KernelAssignee: Jeff Mahoney <jeffm>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: aschnell, jkosina
Version: Beta 5   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: dmesg output

Description Petr Uzel 2008-12-09 15:04:22 UTC
Created attachment 258932 [details]
dmesg output

After a reboot, kernel does not knot about partitions on one of my disks.

1) check that partitions are on the disk
# fdisk -l /dev/hdd
Disk /dev/hdd: 15.3 GB, 15382241280 bytes
255 heads, 63 sectors/track, 1870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00012a7d

   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1               1         243     1951866    7  HPFS/NTFS
/dev/hdd2             244         486     1951897+   7  HPFS/NTFS
/dev/hdd3             487        1870    11116980    f  W95 Ext'd (LBA)
/dev/hdd5             487         729     1951866   83  Linux
/dev/hdd6             730         973     1959898+   7  HPFS/NTFS
/dev/hdd7             974        1216     1951866   83  Linux

2) same as 1), but with parted (to be sure)
# parted -s /dev/hdd print
Model: WDC WD153BA (ide)
Disk /dev/hdd: 15.4GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      32.3kB  1999MB  1999MB  primary                , , , , , , , , , type=07, ,
 2      1999MB  3997MB  1999MB  primary                , , , , , , , , , type=07, ,
 3      3997MB  15.4GB  11.4GB  extended               , , , , , , lba, , , type=0f, ,
 5      3998MB  5996MB  1999MB  logical                , , , , , , , , , type=83, ,
 6      5996MB  8003MB  2007MB  logical                , , , , , , , , , type=07, ,
 7      8003MB  10.0GB  1999MB  logical   ext3         , , , , , , , , , type=83, ,


3) the partitions on hdd are not in /proc/partitions
# cat /proc/partitions | grep hdd
  22    64   15021720 hdd

4) really not there:
# ls -1 /sys/class/block/ | grep hdd
hdd

5) after 'blockdev --rereadpt /dev/hdd', the hdd* partitions appear in /proc/partitions

# cat /proc/partitions | grep hdd
  22    64   15021720 hdd
  22    65    1951866 hdd1
  22    66    1951897 hdd2
  22    67          1 hdd3
  22    69    1951866 hdd5
  22    70    1959898 hdd6
  22    71    1951866 hdd7


6) if i try to create FS on one of those partitions, it fails:
 # mkfs.ext3 /dev/hdd7
mke2fs 1.41.1 (01-Sep-2008)
/dev/hdd7 is apparently in use by the system; will not make a filesystem here!

... but 'lsof /dev/hdd7' does not say anything...

Note: I've tried to boot 2.6.27-rc6 kernel. The affected disk was recognized as sda (not hdd), but all partitions were visible in /proc/partitions

---
# uname -a
Linux foxbat 2.6.27.7-8-default #1 SMP 2008-11-25 00:02:37 +0100 x86_64 x86_64 x86_64 GNU/Linux

Attaching dmesg output. Please let me know if you need any additional info.
Comment 1 Jeff Mahoney 2008-12-09 15:23:02 UTC
The kernel is detecting the partitions fine. Early in the boot, you see:
hdd: hdd1 hdd2 hdd3 < hdd5 hdd6 hdd7 >

It looks like there is an md-raid header on your disk, and md is claiming the entire disk, which appears to drop the partitions:

md: md1 stopped.
md: bind<hdd>
md: raid1 personality registered for level 1
raid1: raid set md1 active with 1 out of 2 mirrors

Kill off the md-raid header and you should be all set.
Comment 2 Petr Uzel 2008-12-11 11:52:38 UTC
(In reply to comment #1 from Jeff Mahoney)
> Kill off the md-raid header and you should be all set.

You're right - killing dm-raid fixed this (I have no idea how dm-raid got onto that disk).

Thanks Jeff!

Closing as INVALID