erlug
[Top] [All Lists]

Re: [Erlug] usare MD (raid1) in produzione: e` saggio?

To: ERlug - Lista Pubblica <erlug@xxxxxxxxxxxxxx>
Subject: Re: [Erlug] usare MD (raid1) in produzione: e` saggio?
From: Davide Bolcioni <db_erlug@xxxxxxxx>
Date: Thu, 15 Jun 2006 22:45:06 +0200
Fabio Muzzi wrote:
  E` saggio usare MD in produzione?

In aggiunta e a beneficio degli archivi, segnalo da RH Magazine:

Does Linux Software RAID ensure block level consistency?
by Achim Dreyer

Symptom: Software RAID consistency checks may indicate false data errors.

A Linux memory buffer may change while that memory buffer is queued for a
write I/O. This may happen when memory-mapped files are used, or when an
application uses direct I/O and the application changes the data before
the write completes, or during regular file I/O if a file is deleted
(truncated) before all the dirty buffers were written to disk.

If a software RAID implementation does not copy the buffer before it
starts writing to disk, then it is possible for the RAID set to become
inconsistent. For example, the data on one member of a RAID 1 set may not
match the data on another member. This is not a problem, because the
application will write the data again if it is still relevant, as
described above. The problem is that certain utilities that check RAID
sets for block-level consistency may report errors. These errors, although
accurate, are not relevant with respect to operating system or
application-level data integrity.

If the system deploys a legacy Software RAID solution such as LSI megaraid
and a BIOS or system utility which performs a block-level consistency check,
and the consistency check reports errors while the applications detect no
problem, contact the hardware vendor to check if the situation described here
applies.

In sostanza, con il software RAID un blocco viene scritto due volte,
prima di qua e poi di la e ci sono circostanze in cui ciò produce
inconsistenze osservabili confrontando blocco per blocco ma non rilevanti, ad esempio i dati i coda a un file scorciato possono
differire.

Spero che in tal caso faccia fede /proc/mdstat, perchè la cosa è
piuttosto sorprendente: d'istinto se c'è un problema si lancia una
utility "a basso livello così sono sicuro" che nel caso in esame
porterebbe a conclusioni sbagliate.

Davide Bolcioni
--
There is no place like /home.

<Prev in Thread] Current Thread [Next in Thread>