4

I'm looking for a little advice here. I've got franken-machine running Ubuntu 14, which I added a four drive RAID6 to few years back and just ran into a problem. Long story short, two of the drives were plugged into a PCI card that died. Probably a bad hardware layout, but too late now. I reconnected the two missing drives, and they are showing up again. However, the array fails to assemble with the error:

mdadm: /dev/md0 assembled from 2 drives - not enough to start the array while not clean - consider --force.

I was reading around and this article said not to use force if the Event counts are too far apart. Which in my case is 300772 to 309. So, a little far apart. It says to force assemble the closest ones, and then add the others.

So assuming that sdb and sdc are good ones with event count of 300772, and sdd and sde are the bad ones with the event count of 309. Should I force assemble sdb and sdc. And then do a standard add and grow? Like so:

mdadm --assemble --force /dev/md0 /dev/sdb1 /dev/sdc1
mdadm --add /dev/md0 /dev/sdd1
mdadm --grow /dev/md0 --raid-devices=3
mdadm --add /dev/md0 /dev/sde1
mdadm --grow /dev/md0 --radid-devices=4

Do I need to shrink the array before regrowing it?

Does this seem like a safe move?

Thanks in advance

2

I would say you don't need to grow the array. It will know automatically that there should be 4 drives. Just add the missing ones:

mdadm --assemble --force /dev/md0 /dev/sdb1 /dev/sdc1
# At this point I would test /dev/md0! mount, fsck, etc. (before destroyng the content of the other two disks.)
mdadm --add /dev/md0 /dev/sdd1
mdadm --add /dev/md0 /dev/sde1

But one note. IMO Raid6 does not make much sense for 4 drives. I would use Raid10, it should perform much better and provides the same size and redundancy like Raid6.

So you could just create a new (degraded) Raid10, copy the old raid to the new one and rebuild.

mdadm --assemble --force /dev/md0 /dev/sdb1 /dev/sdc1
mdadm --create /dev/md1 --level=10 --raid-devices=4 missing  missing /dev/sdd1 /dev/sde1
dd if=/dev/md0 of=/dev/md1 bs=4M
mdadm -S /dev/md0
mdadm --add /dev/md1 /dev/sdb1
mdadm --add /dev/md1 /dev/sdc1
  • Thanks. I'll give that whirl. I had intended on adding more drives as the chasis has plenty of drive bays. That's why I choose RAID6. I just forgot to add them :D – user2659205 May 12 '17 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.