degraded raid must assemble for boot, workaround included
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mdadm (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The first time after pulling one of two disks in my RAID 1,
ubuntu studio 18.04 drops to the Busybox prompt.
I can manually type vgchange -a y and exit and the boot succeeds.
Thereafter, subsequent boots finish successfully.
mdadm 4.1~rc1-
lvm2 2.02.176-
I traced this issue and saw in initramfs-
the code that tries mdadm --run /dev/md?* seems to be what is needed
to "assemble" the single-disk arrays. I have md1 thru md4, /boot on /md1.
The thing is, I read in http://
is expected to be present (local) or the network interface is expected to be usable
these scripts have been executed, that device node should be present. If the
block scripts will be called periodically to try again.
So the degraded arrays need to be assembled before the lvm2 script in local-top, which does have
an mdadm prereq listed. Still in my distro, the local-top directory is free of any mdadm script.
I also had a hint that the volume groups would need to be brought online also, by reading the last comment here: https:/
Bottom line: I fixed my setup by adding scripts/
It may be that the mdadm --run should remain and the vgchange -a y move to local-top/lvm2,
so maybe both packages should be adjusted. For now I am just filing this report to mdadm figuring you will decide if a report into lvm is also appropriate.
Gratitude. Here is my workaround fix:
#!/bin/sh
# /usr/share/
#
# code--1299-
#
# This script enables boot immediately after removing a RAID drive.
#
# The very first time a boot cycle happens after removing a drive,
# the standard mdadm --assemble needs some help to spin up the array.
#
# gratitude https:/
# gratitude https:/
# gratitude /usr/share/
# gratitude from https:/
# Also:
# gratitude https:/
# gratitude https:/
# gratitude https:/
# gratitude http://
# gratitude https:/
PREREQS="udev"
prereqs() { echo "$PREREQS"; }
case "$1" in
prereqs) prereqs; exit 0 ;;
esac
. /scripts/functions
# cat /proc/mdstat >>/dev/
mdadm --run /dev/md?* || true # spin up the array
# cat /proc/mdstat >>/dev/
vgchange -a y || true # activate the lvm volume groups
exit 0
affects: | ubiquity (Ubuntu) → mdadm (Ubuntu) |