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/md0mdadm: /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 1mdadm: added /dev/sdc to /dev/md0 as 2mdadm: added /dev/sdb to /dev/md0 as 0mdadm: 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