Bug#784070: mdadm Software RAID1 with GPT on Debian 8.0.0 amd64 - Does not mount/boot on disk removal

Info Geek infogeekx at gmx.com
Sun May 3 21:00:37 UTC 2015


You can easily reproduce it in VirtualBox:

0) Create 3 virtual HDDs and attach them to system OS.

1) Partition each RAID1 member using GPT:
    1. Bios GRUB - 1 MB
    2. RAID partition
    3. RAID partition

2) Use:
          sd[a-c]3 as RAID1 EXT4(md0);
          sd[a-c]2 as RAID1 swap (md1) .

3) Install base system on md0.

4) Install GRUB on all three RAID1 members.

5) Boot up and wait for full resync.

6) Shutdown virtual machine and remove/detach any one or two virtual HDDs.

7) Boot the machine and see THE PROBLEM.


Description: What happens is the array becomes inactive on any disk 
removal(degraded?), marked as RAID0(for some reason) and all attached 
disks are marked as [S] (for spare) upon reboot.
However, it is possible to boot from it by starting it in the 
"(initramfs)" shell (which it drops to because it "cannot mount root 
device") by using:

(initramfs):  mdadm --run /dev/md0
(initramfs):  mdadm --run /dev/md1
(initramfs):  exit

after which, it boots up fine and shows the arrays as degraded(and will 
continue to boot fine even if rebooted UNTIL one or more disks get 
removed, in which case it will do exactly the same as with a fresh 
installed array, i.e. drop to a (initramfs) shell).

The problem is how to allow the boot of degraded array without manually 
starting them eahc time a disk is removed/dies?

Extra Information:

  * Google spit out a bunch of posts about UBUNTU using
    "*BOOT_DEGRADED=true*" but that doesn't work for DEBIAN.
  * There is alsoa post about using "*md-mod.start_dirty_degraded=1*" as
    a boot argument to the kernel image
    <http://serverfault.com/questions/196445/boot-debian-while-raid-array-is-degraded>.
    I have tried passing it in GRUB menu option, with no avail.
  * There might besomething that explains it
    <https://www.kernel.org/doc/Documentation/md.txt>, but I am a newbie
    to understand :(


Links in the above text:
[1] 
http://serverfault.com/questions/196445/boot-debian-while-raid-array-is-degraded
[2] https://www.kernel.org/doc/Documentation/md.txt


On 2015-05-03 23:32, Michael Tokarev wrote:
> Control: tag -1 + moreinfo unreproducible
>
> 02.05.2015 21:41, Sad Person wrote:
>> Package: mdadm
>> Version: 3.3.2-5
>> Severity: critical
>> -- Package-specific info:
>> --- mdadm.conf
>> CREATE owner=root group=disk mode=0660 auto=yes
>> HOMEHOST <system>
>> MAILADDR root
> ...cut...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20150504/cf18e996/attachment.html>


More information about the pkg-mdadm-devel mailing list