Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#27247 - [mdadm] A raid 1 system is unable to boot after removing one of the disks

Attached to Project: Arch Linux
Opened by M Carreira Silva (mcsilva) - Friday, 25 November 2011, 00:17 GMT
Last edited by Tobias Powalowski (tpowa) - Friday, 25 November 2011, 12:32 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

In a raid 1 (mdadm) system, booting is impossible if we remove one disk.
It drops in a recovery shell after printing the errors: "Unable to determine major/minor number of root device..."


Additional info:

mdadm-3.2.2-4
mkinitcpio-0.7.5-1
linux-3.1.2-1


Steps to reproduce:

Tested in a virtualbox archlinux host, with 2 disks running in raid 1.
After halting the system, remove one disk, and switch on again
(simulating a faulty disk).
The boot stops in the recovery shell.
# cat /proc/mdadm shows that the arrays are "inactive".

I could solve this inside the shell doing:
# mdadm -Ss
# mdadm -As
# exit

The boot continues without errors.
Next reboot the error does not occur.


It was expected that the system could boot even when a disk becomes faulty or degraded.
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Friday, 25 November 2011, 12:32 GMT
Reason for closing:  Fixed
Comment by Gerardo Exequiel Pozzi (djgera) - Friday, 25 November 2011, 01:22 GMT
mkinitcpio.conf ? boot params?
Comment by M Carreira Silva (mcsilva) - Friday, 25 November 2011, 02:16 GMT
mkinitcpio.conf:

MODULES=""
BINARIES=""
FILES=""
HOOKS="base udev autodetect pata scsi sata mdadm_udev filesystems usbinput"

boot params:
root=/dev/disk/by-uuid/4a6a5d4c-6e82-40c0-a990-d0cd67acc1ee ro vga=773

Comment by Dave Reisner (falconindy) - Friday, 25 November 2011, 02:23 GMT
This seems like an upstream problem that a degraded array can't be started via incremental assembly.
Comment by Tobias Powalowski (tpowa) - Friday, 25 November 2011, 08:10 GMT
Does the mdadm hook work instead of mdadm_udev?
Comment by M Carreira Silva (mcsilva) - Friday, 25 November 2011, 11:10 GMT
Yes!
mdadm hook work instead of mdadm_udev.

I changed mdadm_udev by mdadm in HOOKS:
HOOKS="base udev autodetect pata scsi sata mdadm filesystems usbinput"
Also changed boot params to:
root=/dev/md1 ro vga=773
Recreated initramfs with "mkinitcpio -p linux" and restart with both disks working.
Repeated the procedure (removed one disk) and this time it booted perfectly with only one disk, sending the message that all "/dev/mdX has been started with 1 drive (out of 2)".


Comment by Tobias Powalowski (tpowa) - Friday, 25 November 2011, 12:32 GMT
mdadm_udev is not bullet proof for all scenarios, that was the reason for readding the mdadm hook again.

Loading...