On Fri, Aug 19 2016, Chris Dunlop wrote: > > In my case, I want it to write everything. > > If I do my 'dd' to write everything as previously described, with the window > of opportunity for stale data to end up on the written disk, one option > would to run a scrub / repair to check the data is the same - but if I'm > unlucky with my dd and the data isn't the same for some sector[s], I want to > ensure the correct data is copied over the stale data and not the other way > around, e.g. to specify "in the event of a mismatch, use the data from sda > and overwrite the data on sdb". > > Unfortunately I don't know how that can be done. > > Does anyone know? If it is the second device in the array (as listed by mdadm --detail) then you can stop the array and re-assemble with --update=resync. If it is the first device I can only suggest that you fail the device and add it again: mdadm /dev/mdXX --fail /dev/sdYY mdadm /dev/mdXX --remove /dev/sdYY mdadm /dev/mdYY --add /dev/sdYY If the "good" drive fails during the rewrite it might be a little bit fiddley getting the array working again, but all the data will certainly be there on the device you are re-writing, so you won't lose anything. NeilBrown
Attachment:
signature.asc
Description: PGP signature