xfs
[Top] [All Lists]

Re: xfs file system corruption

To: Allan Haywood <Allan.Haywood@xxxxxxxxxxxxx>
Subject: Re: xfs file system corruption
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 8 Oct 2008 11:12:45 +1100
Cc: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
In-reply-to: <E8DED08235A93F4D8A2AB6CD0ABAB32A0A937FC938@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Mail-followup-to: Allan Haywood <Allan.Haywood@xxxxxxxxxxxxx>, "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
References: <E8DED08235A93F4D8A2AB6CD0ABAB32A0A937FC8EC@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081007233418.GB7342@disturbed> <E8DED08235A93F4D8A2AB6CD0ABAB32A0A937FC922@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <E8DED08235A93F4D8A2AB6CD0ABAB32A0A937FC938@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Tue, Oct 07, 2008 at 04:58:24PM -0700, Allan Haywood wrote:
> > I could see this as an issue, if there are pending metadata writes
> > to a filesystem, that filesystem through failure is mounted on
> > another server and used as normal, then unmounted normally, then
> > when the ports are re-activated on the server that has pending
> > metadata, is it possible this does get flushed to the disk, but
> > since the disk has been in use on another server the metadata no
> > longer matches the filesystem properly and potentially writes over
> > or changes the filesystem in a way that causes corruption.
> 
> Right.
> 
> Once you've fenced the server, you really, really need to make
> sure that it has no further pending writes that could be issued
> when the fence is removed. I'd suggest that if you failed to
> unmount the filesystem before fencing, you need to reboot that
> server to remove any possibility of it issuing stale I/O
> once it is unfenced. i.e. step 3b = STONITH.
> 
> > Would reloading the xfs module work also, to clear any pending
> > writes (if I could get it to a point where modprobe -r xfs
> > would work)? Although I am doubting that if there are pending
> > writes that it would be easy to get xfs to unload.

Correct. While a filesystem is mounted, you can't unload the XFS
module.

> > Another possibility, is there a command that will tell xfs
> > To clear any pending writes?

You can force-shutdown the filesystem then unmount it. That
is:

# xfs_io -x -c "shutdown" <mtpt>
# umount <mtpt>

See the man page for xfs_io - you want to shut down the filesystem
without forcing the log (can't do I/O).

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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