mdadm misdetects disks instead of partitions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
debian-installer (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: mdadm
When building a RAID5 with mdadm mdadm confuses partitions and disks if the partition ends with the disk.
Steps to reproduce: (in my case
1. Take 4 500G harddisks.
2. Add a 2 gigabyte partition to each of them
3. Use the rest as a logical partition for the raid
4. create a raid5 raid with /dev/sd?5
mdadm --misc --examine /dev/sd? will show precisely the same as
mdadm --misc --examine /dev/sd?5
On reboot the raid will use /dev/sd? instead of /dev/sd?5 either sd? will be inaccessable because another partition has been mounted before, resulting in a degrades raid, or after starting the raid other partitions will not be accessable.
Possible solution:
Fix mdadm so it first looks for superblocks on the partitions. If it found a superblock there, skip checking for the superblock of the device.
affects: | mdadm (Ubuntu) → debian-installer (Ubuntu) |
Quick fix:
in mdadm.conf
replace DEVICE partitions
by DEVICE /dev/sd??
Its not clean, but gets rid of a lot of trouble.