1

I have somehow managed to corrupt my RAID 5 array. I am using Ubuntu 24.04, and my existing RAID5 array is on 3 x 240Gb SSDs, and my OS is on a 120Gb SSD. As far as I can tell the 3 raid discs are OK (I have checked using smartctl and badblocks - no errors reported). The Disks utility shows the disks as being members of a Raid.

If I issue the command sudo mdadm --assemble --force --run --verbose /dev/md0 /dev/sdb /dev/sdc /dev/sdd I get the following response:

mdadm: looking for devices for /dev/md0
mdadm: /dev/sdb is identified as a member of /dev/md0, slot 0.
mdadm: /dev/sdc is identified as a member of /dev/md0, slot 2.
mdadm: /dev/sdd is identified as a member of /dev/md0, slot 1.
mdadm: added /dev/sdd to /dev/md0 as 1
mdadm: added /dev/sdc to /dev/md0 as 2
mdadm: added /dev/sdb to /dev/md0 as 0
mdadm: failed to RUN_ARRAY /dev/md0: Invalid argument

I don't understand the last line of the output - anyone?

Several times in the past when I have reinstalled my Ubuntu OS, all I have had to do to recover the Raid was to use mdadm --assemble (can't remember the full syntax I used) and that worked OK. So rather than reinstalling the OS I purge removed mdadm with apt, rebooted, updated and upgraded with apt, and reinstalled mdadm. As a result I no longer have outputs from cat /proc/mdstat, or a valid mdadm.conf file - sorry. Needless to say that didn't work. I tried using mdadm --build but it complained about not being able to build a level 5 raid - don't know why - anyone?

I don't want to go down the road of using mdadm --create because (I think) that will blow away the raid and create a new one. This would be disastrous for me, I need to get back my existing array even if it is in a degraded state so that I can backup the data and recreate it. Can anybody help save my sanity, please?

Regards, Stuart

4
  • dmesg after mdadm --assemble? mdadm --examine? Commented Aug 22, 2024 at 9:14
  • are those the original disks or did you change one (and was it working before of course)? Using the entire disk like /dev/sdx to create a raid array can bring some problems if one of the disk in the group does not have the exact same number of sectors. Commented Aug 22, 2024 at 10:20
  • I have updated the question with dmesg output from mdadm --assemble Commented Aug 23, 2024 at 18:08
  • In response to darxmurf, these are the original disks (identical make and model) and to my knowledge have not cause a problem until now. Having said that, a few weeks ago I had a problem with the same initial symptoms - I could not log into the Ubuntu GUI because my /home directory is on my RAID (at the time I did not know the RAID might have been a problem). At that time I booted the machine into a previous kernel, that seemed OK, so I tried a normal boot and that was OK. Strange, but I thought no more of it. Commented Aug 23, 2024 at 18:13

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.