On Tue, Mar 21 2017, Andreas Klauer wrote: > On Tue, Mar 21, 2017 at 01:03:22PM +0100, Reindl Harald wrote: >> the IO of a RAID5/6 rebuild is hardly linear beause the informations >> (data + parity) are spread all over the disks > > It's not "randomly" spread all over. The blocks are always where they belong. > > https://en.wikipedia.org/wiki/Standard_RAID_levels#/media/File:RAID_6.svg > > It's AAAA, BBBB, CCCC, DDDD. Not DBCA, BADC, ADBC, ... > > There is no random I/O involved here, at worst it will decide to not read > a parity block because it's not needed but that does not cause huge/random > jumps for the HDD read heads. RAID5 resync (after an unclean shutdown) does read the parity. It reads all devices in parallel and checks parity. Normally all the parity is correct so it doesn't write at all. Occasionally there might be incorrect parity, in which case the head will seek back and write the correct parity. RAID5 recovery (when a device was removed and a new device is added) reads all the *other* devices in parallel, calculates the missing block (parity or data) and writes out to the replaced devices. All reads and writes are sequential. NeilBrown > >> while in case of RAID1/10 it is really linear > > Actually RAID 10 has the most interesting layout choices... > to this day mdadm is unable to grow/convert some of these. > > In a RAID 10 rebuild the HDD might have to jump from end to start. > > Of course if you consider metadata updates (progress has to be > recorded somewhere?) then ALL rebuilds regardless of RAID level > are random I/O in a way. > > But such is the fate of a HDD, it's their bread and butter. > Any server that does anything other than "idle" does random I/O 24/7. > > If there was no other I/O (because the RAID is live during rebuild) > and no metadata updates (or external metadata) you could totally do > RAID0/1/5/6 rebuilds with tape drives. That's how random it is. > RAID10 might need a rewind in between. > > Regards > Andreas Klauer > -- > To unsubscribe from this list: send the line "unsubscribe linux-raid" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html