2

My Ubuntu server now fails to boot: It uses a RAID 5, and one of those drives failed. The OS is on the RAID array, and rebuilding now fails with the replacement drive.

I can't post pastebins or anything because I only have physical access using a live drive at the moment.

Using mdadm I see drive /dev/sde failed completely (won't show up on the system at all). Using mdadm - - examine I found out that the other drives still know that they belong to a RAID-5. And under array state I see drive three out of the six is missing (AA.AAA).

However, if I try to assemble it, it only wants to use drive three, which isn't enough to build the RAID-5 back up; even more, it wants to make it RAID-0.

How do I fix this?

Edit: this would be on ubuntu 18.04.3 live cd, running from usb

5
  • 2
    Which version of Ubuntu? Please click edit and add it to your original question.
    – K7AAY
    Commented Nov 7, 2019 at 0:47
  • 1
    It is not clear which drives have failed and which drives you have replaced. Please be more specific. NOTE: If you have lost 2 drives in a RAID5 then all of your data is lost. Format and start over.
    – HackSlash
    Commented Nov 12, 2019 at 16:51
  • Plz post your mdadm --detail /dev/md0 here
    – ebal
    Commented Nov 13, 2019 at 19:34
  • 1
    We definitively need more info to understand your raid config and which disks are seen in the machine. So some cat /proc/mdstat, mdadm --detail /dev/md0, ls -l /dev/sd?, fdisk -l /dev/sd? will help to confirm that the 3rd disk in the array is actually /dev/sde.
    – xenlo
    Commented Nov 14, 2019 at 14:44
  • I will try to do that! As soon as i get home this evening! Commented Nov 15, 2019 at 10:05

1 Answer 1

2
+50

You should try with the --run flag:

Once an appropriate array is found or created and the device is added, mdadm must decide if the array is ready to be started. It will normally compare the number of available (non-spare) devices to the number of devices that the metadata suggests need to be active. If there are at least that many, the array will be started. This means that if any devices are missing the array will not be restarted.

As an alternative, --run may be passed to mdadm in which case the array will be run as soon as there are enough devices present for the data to be accessible. For a RAID1, that means one device will start the array. For a clean RAID5, the array will be started as soon as all but one drive is present.

http://manpages.ubuntu.com/manpages/bionic/man8/mdadm.8.html

1
  • 1
    Thank you! Rl has gotten in the way, i will try it soon and report back! Commented Nov 20, 2019 at 8:12

You must log in to answer this question.

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