View previous topic :: View next topic |
Author |
Message |
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2199
|
Posted: Thu Jul 26, 2018 7:13 pm Post subject: Readding a stale drive to mdadm RAID5 ? |
|
|
While plugging new memory into my box, I inadvertantly disconnected a disk power lead, When it booted, mdadm successfully started the RAID array with 3 out of 4 disks. So I stopped the box, reconnected the cable, and restarted. mdadm didn't like the stale drive, and used only the same 3 disks as before.
IIUC, I just need to restart the machine, and mdadm --add the stale drive back into the array, and wait while mdadm repopulates it.
Please can anyone confirm this? (I do have backups, but I don't think I need them in this case.) _________________ Greybeard |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3477
|
Posted: Thu Jul 26, 2018 9:01 pm Post subject: |
|
|
You could try mdadm --remove and then --re-add that drive. If you have write intent bitmap, it should only synchronize outdated areas.
Otherwise --remove it from raid, --zero-superblock and then --add it again for a full resync, just in case.
Reboot is not necessary as long as your system can detect that drive and use it. SATA even supports hotplug. |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2199
|
Posted: Fri Jul 27, 2018 8:11 am Post subject: |
|
|
Thanks szatox. In the end, Code: | mdadm /dev/md127 --re-add /dev/sdb3 | seems to have done the job in almost no time. Syslog shows
Code: | Jul 27 07:26:01 acer kernel: md: recovery of RAID array md127
Jul 27 07:26:01 acer kernel: md: md127: recovery done. |
_________________ Greybeard |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|