Re: XFS filesystem corruption

Ric Wheeler
2013-03-07T13:40:44Z

On 03/07/2013 08:15 AM, Julien FERRERO wrote:
>> We actually test brutal "Power off" for xfs, ext4 and other file systems. If
>> your storage is configured properly and you have barriers enabled, they all
>> pass without corruption.
>>
>> What hardware raid cards can do is to hide a volatile write cache. Either on
>> the raid HBA itself or, even worse, on the backend disks behind the card.
>> S-ata disks tend to default to write cache enabled and need to be checked
>> especially careful (sas drives tend to be write cache disabled by default).
> Write cache is supposed to be disabled on the H/W RAID (according to
> hdparm) and barrier are correctly enabled since xfs does not report
> any warning at mount.

hdparm shows you the devices that the card shows, not the state of the write
cache on the drives behind them.

You need special vendor tools to do....

The LSI controllers for example have megaraid tools.

Until your IO stack is properly configured, you really don't need to worry about
the file system options :)

ric

>
> The odd thing is we never see this with kernel 2.6.18 where barriers
> weren't yet available. An other difference is the "unwritten extend"
> that was used to set to 0 by default. Now we cannot change this
> setting according to an old thread I've found: "unwritten extents on
> linux are generally a bad idea, this option should not be used.".
> Unfortunately, the engineer that chose this setting is no longer
> working with us...