xfs
[Top] [All Lists]

Re: Data safety horror stories?

To: "Felix E. Klee" <felix.klee@xxxxxxx>
Subject: Re: Data safety horror stories?
From: David Chinner <dgc@xxxxxxx>
Date: Tue, 12 Feb 2008 09:03:39 +1100
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <1202748389.28320.1236240801@webmail.messagingengine.com>
References: <1202748389.28320.1236240801@webmail.messagingengine.com>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Mon, Feb 11, 2008 at 05:46:29PM +0100, Felix E. Klee wrote:
> I heard that, in case of a power failure, XFS may lose data, even data
> that was already existing on the disk. For example, I heard horror
> stories of files being overwritten with zeros.
> 
> Are those stories true?
> 
> If so:
> 
> * Do you recommend not using XFS on devices that may frequently fail due
>   to power failure?

Depends on how much you care about your system and data.

I use XFS on write-cache enabled SATA drives without barriers with
no UPS (yes, it's unsafe!) and I lose power at least once a week.  I
haven't had a data loss or corruption in over two years and tens of
power failures.... 

> * Is it possible to find out what files have been damaged?

Not easily.

> If not,
>   will only files be affected that have been changed during the last
>   couple of hours?

Last few seconds before the power fail, actually.

> * Are there options to increase data safety? Should one run a regular
>   "sync" in a cron job?

If you are truly paranoid - turn off drive caching and mount with
the 'wsync' option.

> * Is it unsafe to use XFS in a virtual machine which may sometimes be
>   terminated without proper shutdown?

I do that all the time, too. Corruption is rare and usually
as a result of some bug in the code I'm testing ;)

> I currently am using XFS under Ubuntu 7.10 (Kernel 2.6.22), running in a
> virtual machine (VMware) under Windows.  The XFS file system is in a
> native partition on a second HDD.

Should be just fine. If you are really concerned - test it.

Cheers,

Dave.
> 
> -- 
> Felix E. Klee
> Jabber/Google Talk: feklee@xxxxxxxxxx, SIP: 9779619@xxxxxxxxxx
> ICQ: 158124695, Yahoo!: feklee, AIM: felix.klee@xxxxxxx
> Gizmo: felixklee, Skype: felix.klee
> 

-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group


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