Re: Force parity resync on raid5?

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

 



On Tuesday August 10, philip@xxxxxxxxxxxxxx wrote:
> 
> Linux RAID *has* to have sort of way to force a parity resync.  If it
> doesn't have one, it needs one.  That's a glaring omission to make.

Well, you get what you pay for.....

The easiest way to force a resync would be to re-create the array.

 - Note the exact order of the drives in the array, and the chunk size.
 - Stop the array.
 - Create the array with mdadm using --force.  That bit is important.

    mdadm --create /dev/mdX --level=5 --force --disks=whatever \
       --chunksize=64k  /dev/sda1 /dev/sdb1 .....

 Remember the --force.  If you don't have it, you will get a recovery
 cycle that rebuilds one drive against the others rather than a resync
 that checks and corrects parity.

 This will recreate the array (almost) exactly as it currently is, but
 it will not be marked 'clean', so a parity check-and-correct will
 happen.

 It should be fairly easy to add a --update=dirty option to
    "mdadm --assemble"
 to make that a bit easier.  I might do that in a  day or two (though
 I might not).

 Ofcourse, it would be really nice if you could just tell md to run a
 resync pass.  It's on my todo list, but it isn't the only thing.
 Clean, well-designed, small patches gladly accepted.

NeilBrown

(don't forget the --force)
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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