[ale] Best FS to use when doing unclean shutdowns?

Greg Freemyer greg.freemyer at gmail.com
Mon Jul 11 15:42:11 EDT 2005


On 7/11/05, Claudia Morlan <CMorlan at filink.com> wrote:
> Its purpose is information gathering and will be deployed blindly.  As
> such, once it is installed we will not touch the box until it is
> removed.  This is an embedded device and has no soft-off button only a
> power switch.
> 
> Thanks.
> 

If speed is a lesser concern, consider using the -sync mount option. 
Not sure what filesystems support that, or maybe it is a generic Linux
thing so all of them do.  I do know that XFS supports it.

The -sync option is supposed to tell the entire FS/partition to ensure
data is flushed from cache prior to returning from write() calls.  You
would also want to disable any controller/disk write caches you have.

If that is too unwieldy for you, I think you can use the chattr
command to set a file-by-file flag that enables sync.  That way any
specific files you want to protect should not return from write()
calls until their data is flushed from cache.

As I recall, chattr is only documented to work with ext2/ext3, but
support has also been in XFS for a while now.

FYI: Without the use of the above, I would consider XFS my last choice
for surviving unclean powerdowns.  It has a very bad reputation.

FYI2: there was recent thread about all this on the XFS mailing list. 
It had a little more information than the above.

Greg



More information about the Ale mailing list