Era generalizzato, ma mi riferivo a hardware difettoso ad esempio: cpu, ram o con un bug del firmware. Il kernel non rileva e non evita il "bitrot" ma genera un errore IO se un settore non può essere letto.Cosa vuol dire "Per un problema al disco o altra causa il Disco1 principale scrive dati corrotti"? Se uno dei dischi accusa anomalie fisiche, il kernel lo rileva e lo segnala, e se ci sono dei settori danneggiati il kernel è in grado di marcarli come tali e di non usarli in fase di scrittura.
Ti incollo una parte di una discussione sui problemi agli hard disk, perché tutto il mio ragionamento si basa su queste discussioni:
> Normally this shouldn't be the case, as long as the fs has correct
> journal and flush/barrier.
If you are asking the question:
"Are there some currently shipping retail hard drives that are
orders of magnitude more likely to corrupt data after simple
power failures than other drives?"
then the answer is:
"Hell, yes! How could there NOT be?"
It wouldn't take very much capital investment or time to find this out
in lab conditions. Just kill power every 25 minutes while running a
btrfs stress-test should do it--or have a UPS hardware failure in ops,
the effect is the same. Bad drives will show up in a few hours, good
drives take much longer--long enough that, statistically, the good drives
will probably fail outright before btrfs gets corrupted.
> If it's really the hardware to blame, then it means its flush/fua is not
> implemented properly at all, thus the possibility of a single power loss
> leading to corruption should be VERY VERY high.
That exactly matches my observations. Only a few disks fail at all,
but the ones that do fail do so very often: 60% of corruptions at
10 power failures or less, 100% at 30 power failures or more.
Invece è utile per prevenire la perdita di quei dati ancora non inviati al backup, poi ovviamente nemmeno io ad oggi uso il mirroring, ma non è inutile ed è la prima cosa che farei se dovessi configurare a un utente uno storage dove la perdita dei dati deve essere al minimo: dati raid 1 > backup single disk e magari un servizio cloud.

