[lkml]   [2005]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: critical bugs in md raid5
    Marc Lehmann <> writes:
    > The summary seems to be that the linux raid driver only protects your data
    > as long as all disks are fine and the machine never crashes.

    "as long as the machine never crashes". That's correct. If you think
    about how RAID 5 works there is no way around it. When a write to
    a single stripe is interrupted (machine crash) and you lose a disk
    during the recovery a lot of data (even unrelated to the data just written)
    is lost. That is because there is no way to figure out what part
    of the data on the stripe belonged to the old and what part to
    the new write.

    But that's nothing inherent in Linux RAID5. It's a generic problem.
    Pretty much all Software RAID5 implementations have it.

    The only way around it is to journal all writes, to make stripe
    updates atomic, but in general that's too slow unless you have a
    battery backed up journal device.

    There are some tricks to avoid this (e.g. always write to a new disk
    location and update an disk index atomically), but they tend to be
    heavily patented and are slower too. They also go far beyond RAID-5
    (use disk space less efficiently etc.) and typically need support
    from the file system to be efficient.

    RAID-1 helps a bit, because you either get the old or the new data,
    but not some corruption. In practice even old data can be a big
    problem though (e.g. when file system metadata is affected)

    Morale: if you really care about your data backup very often and
    use RAID-1 or get an expensive hardware RAID with battery backup
    (all the cheap "hardware RAIDs" are equally useless for this)

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:09    [W:0.020 / U:30.156 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site