xfs
[Top] [All Lists]

Re: Does XFS support the sync mount option?

To: Ewan Chalmers <ewan.chalmers@xxxxxxxxx>
Subject: Re: Does XFS support the sync mount option?
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Thu, 12 Feb 2009 18:39:42 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <884979c90902121546g35f594b1s592859ac7b832533@xxxxxxxxxxxxxx>
References: <884979c90902050643m78d2e0dbt85aa7f4369e243ef@xxxxxxxxxxxxxx> <20090206230502.GQ24173@disturbed> <884979c90902121546g35f594b1s592859ac7b832533@xxxxxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)
Ewan Chalmers wrote:
> Thanks for your detailed reply.
> 
>> And "sync" only works if you turn drive write caches off or have
>> barriers enabled. There are many people out there that  have systems
>> that are suseptible to fatal filesystem corruption that could be
>> triggered by doing this (because critical metadata is lost from
>> the volatile write cache on the drive when you power it off).
> 
> According to the FAQ, barriers are enabled by default since 2.6.17.

That's kernel version

> I
> have 2.9.8, 

that's xfsprogs version.

> so I guess barriers are enabled. I have checked and dmesg
> contains no errors relating to barriers.
> 
> Also according the FAQ... "With a single hard disk and barriers turned
> on (on=default), the drive write cache is flushed before an after a
> barrier is issued. A powerfail "only" loses data in the cache but no
> essential ordering is violated, and corruption will not occur."
> 
> So it sounds like pulling the plug on the disk should not cause
> corruption in this case (sync mount and barriers default enabled). Or
> am I just plain wrong?

It should not cause metadata corruption

> (BTW, I've done an xfs_repair which reported no errors.)

... which is what repair will check for.

-Eric

> Thanks,
> Ewan

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