Paul Winkler wrote:
It should also be noted that a lot of hard disk failures are due to
mains power loss.
Modern harddisks use a lot of write caching on the controller to achieve
decent performance. So when power goes down when there is data in the
write cache, it is lost. The file system however 'thinks' that data has
been written correctly. This hence results in file system corruption.
But there is also the issue of interruption of the actual physical write
operation when power goes down. If a drive is writing a sector when the
power goes down, it won't be able to update the CRC data for the sector,
hence the next time the sector is read, the CRC check fails and the
drive marks the sector as 'bad'. The sector is however not mechanically
broken. When doing a low level format of the drive that also tries to
re-initialize the bad sectors, the drive will be repaired to an 'as new'
Another important note that this is *not* solved with RAID mirroring. In
fact, RAID mirroring will make things worse, as you now have two
independent write caches and head locations.
One solution to this is to disable write caching on the drive, and live
with the consequences, mainly a very big performance hit.
My personal solution is a UPS. Most of the power outages for me are due
to some circuit overload, so the 15 minutes of battery power are enough
to survive the re-enabling of the circuit. And if not it shuts down
My experience is that *every time* your system has a power failure, you
have some file system and hard disk corruption. I would certainly
recommend everybody to use one, a UPS is a better investment than a
second disk for software RAID mirroring. And it is pretty cheap (about
An unrelated remark with respect to hard disk configuration:
I personally think that using a hardware RAID5 controller (e.g. a 3ware
escalade), together with a bunch of less-performing but more
silent/reliable drives will give you the best solution.
I think something like a RAID-5 of 4x 100Gb 5400RPM disks will give you
a system that is fast, reliable, and high capacity (300Gb). A shame that
5400RPM drives are so hard to get...
I've tried a lot of setups and a lot of harddisks, all resulting in
failures due to power outages. Since I switched over to a 3ware escalade
RAID5 setup (3x160GB maxtor) and a UPS, I haven't had any problems. I
can only recommend it. Of course it is not the quietest of setups, but
it's not that bad... my laptop is noisier.