Bug in raid5 recovery mode

I got my disk S.M.A.R.T warning last week

so, i change a new disk for the bad one

I used radi5, and also chose “auto rebuild”

but my EX4 keep report “warning:raid degraded” and  “new disk inset in bay4, please chose ‘Change raid’”

I tried reboot many times, but it still show warning and red light! and I use scan, every disk is ok!

so, I tried by the report solution, “change raid to raid5”, but when i press finish, it format my disk, and i lost my data!

ok, I think maybe I misunderstand it .

Today, Ex4 suddenly show “raid degrade” again!

But when  I use scan check, every disk is ok!

 I have tried evey mothed i could think, but can not add disk4 to raid5 at last , I think this maybe a bug

does EX4 can’t auto recovery from raid5 when change 1 disk?!!!

I could not believe! It should be a basic function for data safe!

I have solved this problem by my self

I use ssh login the system , and rebuild the raid by my self, the command I used:

mdadm --remove  /dev/md0 /dev/sdd1 (my broken disk is bay4, remove it from md0 array, else it will report disk is busy)

dd if=/dev/zero of=/dev/sdb2 (clean the disk, I’m not find fdisk command on WDEx4)

mdadm --add /dev/md1 /dev/sdd2 (add the disk to raid array md1, rebuilding will start)

notice:

close the power manager, make sure EX4 will not shutdown when processing rebuilding raid(I found when EX4 reboot in rebuilding, it will never continul rebuilding again)

ok, wait rebuilding finish, raid become healthy

I think WDEx4 auto rebuilding may have some bug, when it rebuilding failed, it will not try to fix,

and because the disk have a partion on it already,  so it will never try to rebuilding again.

And it will not show “Manually rebuild“ option also.