raid10 not activated due to array vs subarray confusion

Bug #1202955 reported by Ebbex
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dmraid (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

I've just installed a HP Microserver (N40L) with the latest installer from precise-updates/main/installer-amd64/20101020ubuntu136.9/images/quantal-netboot. The installer fails to activate the raid, so I had to drop into a shell, write dmraid -ay, to continue the installation.

After the install, I have the exact same problem, I'm always dropped into the busybox initramfs shell, write "dmraid -ay" to activate the raid, and "exit", and boot continues as normal.

I've solved my problem by adding the line "[ -x /sbin/dmraid ] && /sbin/dmraid -ay" to the end of the /usr/share/initramfs-tools/scripts/local-top/dmraid as suggested in https://bugs.launchpad.net/ubuntu/+source/dmraid/+bug/247027/comments/21

But I'm guessing there's a more sophisticated procedure that's not kicking in on my system. What information can I start providing to help get this fixed? (If there's a ubuntu developer interested, I can provide access directly to the box via the ilo device.)

(initramfs) blkid
(initramfs) blkid -p /dev/sd[a-d]
/dev/sda: TYPE="promise_fasttrack_raid_member" USAGE="raid"
/dev/sdb: TYPE="promise_fasttrack_raid_member" USAGE="raid"
/dev/sdc: TYPE="promise_fasttrack_raid_member" USAGE="raid"
/dev/sdd: TYPE="promise_fasttrack_raid_member" USAGE="raid"

Without any parameters blkid doesn't return anything.

(initramfs) dmraid -ay
RAID set "pdc_ebdeeaiceb-0" was activated
RAID set "pdc_ebdeeaiceb-1" was activated
RAID set "pdc_ebdeeaiceb" was activated
RAID set "pdc_ebdeeaiceb1" was activated
RAID set "pdc_ebdeeaiceb2" was activated
RAID set "pdc_ebdeeaiceb3" was activated

I'm filing it under linux-lts-quantal, since it's the highest level package (I think) that is affected by the underlying problem. And I'm told it's not related to https://bugs.launchpad.net/ubuntu/+source/dmraid/+bug/941874

linux-image-3.5.0-36-generic #57 precise1 (amd64)
dmraid 1.0.0.rc16-4.1ubuntu8

Revision history for this message
Ebbex (eb4x) wrote :

(initramfs) dmraid-activate sda
ERROR: pdc: wrong # of devices in RAID set "pdc_ebdeeaiceb-1" [1/2] on /dev/sdd
ERROR: pdc: wrong # of devices in RAID set "pdc_ebdeeaiceb-1" [1/2] on /dev/sdc
ERROR: pdc: wrong # of devices in RAID set "pdc_ebdeeaiceb-0" [1/2] on /dev/sdb
ERROR: pdc: wrong # of devices in RAID set "pdc_ebdeeaiceb-0" [1/2] on /dev/sda
ERROR: either the required RAID set not found or more options required
no raid sets and with names: "pdc_ebdeeaiceb-0"

Revision history for this message
Ebbex (eb4x) wrote :

(initramfs) dmraid -s -si
*** Superset
name: pdc_ebdeeaiceb
size: 1953124864
stride: 128
type: raid10
status: ok
subsets: 2
devs: 4
spares: 0
--> Subset
name: pdc_ebdeeaiceb-0
size: 1953124864
stride: 128
type: stripe
status: ok
subsets: 0
devs: 2
spares: 0
--> Subset
name: pdc_ebdeeaiceb-1
size: 1953124864
stride: 128
type: stripe
status: ok
subsets: 0
devs: 2
spares: 0

(initramfs) dmraid -s -si -ct
raid10
stripe
stripe

Revision history for this message
Ebbex (eb4x) wrote :

I think I've traced it down to a problem with the logic in dmraid-activate

Raid_Name=$(dmraid -i -r -cr /dev/$Node_Name | grep -vi "No RAID disks" | grep -vi "formats discovered")
activate_array "$Raid_Name"

Here it tries to activate a subset of a raid10. (pdc_ebdeeaiceb-0, pdc_ebdeeaiceb-1) when it probably should try to activate the superset pdc_ebdeeaiceb

I solved my problem replacing the line with this
Raid_Name=$(dmraid -s -cr)

And now it boots!

Revision history for this message
Phillip Susi (psusi) wrote :

This looks promising. Can you show the difference between dmraid -i -r -cr /dev/sda and dmraid -s -cr?

affects: dmraid → dmraid (Ubuntu)
no longer affects: linux-lts-quantal (Ubuntu)
Revision history for this message
Phillip Susi (psusi) wrote :

By the way, if you are not dual booting with Windows, you should avoid using the fakeraid and stick to traditional mdadm software raid, which is much better supported and more feature complete.

Revision history for this message
Ebbex (eb4x) wrote :

(initramfs) dmraid -i -r -cr /dev/sda
pdc_ebdeeaiceb-0

(initramfs) dmraid -s -cr /dev/sda
ERROR: pdc: wrong # of devices in RAID set "pdc_ebdeeaiceb-1" [1/2] on /dev/sdd
ERROR: pdc: wrong # of devices in RAID set "pdc_ebdeeaiceb-1" [1/2] on /dev/sdc
ERROR: pdc: wrong # of devices in RAID set "pdc_ebdeeaiceb-0" [1/2] on /dev/sdb
ERROR: pdc: wrong # of devices in RAID set "pdc_ebdeeaiceb-0" [1/2] on /dev/sda
ERROR: either the required RAID set not found or more options required
no raid sets and with names: "/dev/sda"

(initramfs) dmraid -s -cr
pdc_ebdeeaiceb

Revision history for this message
Ebbex (eb4x) wrote :

And yes, unfortunately I'm dualbooting Windows Server for other experiments.

Revision history for this message
Phillip Susi (psusi) wrote :

It seems the bug is that dmraid -i -r -cr /dev/sda is listing the name of the first subset rather than the superset. Your workaround won't work if you have more than one array so it seems the underlying bug will need to be fixed to have raid10 work.

Changed in dmraid (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
summary: - (fakeraid) root device not activated during boot
+ raid10 not activated due to array vs subarray confusion
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.