From: Dave Chinner <david@fromorbit.com>
To: Allan Haywood <Allan.Haywood@microsoft.com>
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: xfs file system corruption
Date: Wed, 8 Oct 2008 11:12:45 +1100 [thread overview]
Message-ID: <20081008001245.GC7342@disturbed> (raw)
In-Reply-To: <E8DED08235A93F4D8A2AB6CD0ABAB32A0A937FC938@NA-EXMSG-C121.redmond.corp.microsoft.com>
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@fromorbit.com
next prev parent reply other threads:[~2008-10-08 0:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-07 23:18 xfs file system corruption Allan Haywood
2008-10-07 23:34 ` Dave Chinner
2008-10-07 23:49 ` Allan Haywood
2008-10-07 23:58 ` Allan Haywood
2008-10-08 0:12 ` Dave Chinner [this message]
2008-10-08 0:15 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081008001245.GC7342@disturbed \
--to=david@fromorbit.com \
--cc=Allan.Haywood@microsoft.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox