3

I have a two-disk mdadm RAID1 array. One of the disks has died so the array is in a degraded state. It's been like this for a while and while I didn't mind getting the occasional email through, recently mdadm had an update that now forces the boot process to halt in an interactive mode where I have to press y to continue or it falls to busybox. Very dull.

I'd like to keep the remaining data but I'd like the drive not to be mdadm-reliant any more. Is there a quick way to delete toe MD superblocks and mount it directly without losing data?

2 Answers 2

5

No. But if I understand correctly, the update of mdadm has replaced your configuration. It should've asked you if you wanted to keep the old one or replace it. If that is the case, then you can either use "sudo dpkg-reconfigure mdadm" or edit /etc/initramfs-tools/conf.d/mdadm so that BOOT_DEGRADED=true.

1
  • /etc/initramfs-tools/conf.d/mdadm was the problem. Thanks.
    – Oli
    Jun 17, 2011 at 9:06
5

It depends. If you are using mdadm superblock format 0.9, or 1.0 ( but not 1.1 or 1.2 ), then you can simply use mdadm --zero-superblocks ( from a livecd or otherwise with the array stopped ) to zap the raid superblocks, and then can access the disk normally. You can also reshape the array so that it is only supposed to have one disk instead of two and then it won't be degraded anymore. Then if you do get around to replacing the failed disk later, you can grow it back.

To reshape the array so that having only the single disk is considered normal, do:

mdadm -G /dev/md0 -n 1 --force

Also you can see what superblock format you are using with mdadm -E /dev/sdXX

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .