Re: Cannot add replacement hard drive to mdadm RAID5 array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22.04.2021 19:56, Devon Beets wrote:
> I ran with sudo since my user is not root in this case:
> 
> printf "%llu\n" -1 > sudo /sys/block/md126/md/resync_start
> -bash: printf: /sys/block/md126/md/resync_start: invalid number
> 
> So, we assumed that you simply wanted us to edit the resync_start file value to the number 18446744073709551615. I did it by hand using a text editor. After doing so, the value of the file changed to none.

That's right, sorry I forgot about sudo. It's a bit tricky to use it with
redirections. Something like this should work:

sudo sh -c 'printf "%llu\n" -1 > /sys/block/md126/md/resync_start'

> After that, I proceeded to reconstruct the array. But I changed the order of the commands. Not sure if that mattered.
> 
> sudo mdadm -S /dev/md125
> mdadm: stopped /dev/md125
> 
> sudo mdadm -a /dev/md127 /dev/sdb
> mdadm: added /dev/sdb
> 
> sudo mdadm -R --force /dev/md126
> mdadm: Started /dev/md/Data with 3 devices (0 new)
> 
> Even though it only reported 3 devices (0 new) during the last command's output, it successfully added the new /dev/sdb drive as a spare, started the array resync, and is recovering now as reported by cat /proc/mdstat.
> 
> Thank you so much for the assistance!

No problem, I'm glad you got it working.

Regards,
Artur



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux