xfs
[Top] [All Lists]

Simultaneously mounting one XFS partition on multiple machines

To: xfs@xxxxxxxxxxx
Subject: Simultaneously mounting one XFS partition on multiple machines
From: "Patrick J. LoPresti" <lopresti@xxxxxxxxx>
Date: Tue, 4 Jan 2011 09:46:39 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=cqPigC13URPLtxWqHnV44CQi+ItM04E5mTjd6QvwtwM=; b=ciVGZfkFPe+oJoTOTkEbkiF7iDeCsDf8ISikReA2OdUUDUl864QpxQWC4oAGSBEoGl pbo0UwxK5ARX4cAnV7u8wxD6sNWBJnosrX14lNjNNpoQnztuY39m1oCLr0fGlmSv765n ycKTt6/HbOY8AtYLQKKirMqez8kz5QwXATz1s=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=FmazOs13AAJxzkxpBaH3i3cWgsqaHQbmHaZyjIIyJ5PKO3uz1zK1vX7Lp3ilUZk8Lk FVhoQ8qKQbTI+FGY7NIfCPxHdM8qedGzwfTp3rBGJoeMBRvZ5FFII8Em8QVQrzd5uzGD ms39U1Igs9BqhSDS7sApKs/Bg+PfiOhFfet30=
Hey, what's the worst that could happen?

I recently learned that some of my colleagues have configured two
Linux systems to simultaneously mount a single XFS partition residing
on shared storage.  Specifically, "system R" has the partition mounted
read-only while "system W" has it mounted read/write.

I told them that this sounds like a very bad idea because XFS is not a
clustered file system.  But they are skeptical because "it seems to be
working fine".  I need to know what the actual risks are and whether
they can be mitigated.

This partition holds large amounts of essentially archival data; that
is, it is read frequently but written rarely.  When they do want to
write to it, they do so via system W and then reboot system R.

I am no expert on XFS, but there are essentially two risks that I can see:

Risk 1: When making changes via system W, the view of the file system
from system R can become corrupted or inconsistent.  My colleagues are
aware of this and believe they can live with it, as long as the
underlying file system is not being damaged ("we can just reboot").

Risk 2: Any time the file system is mounted, even read-only, it will
replay the journal if it is non-empty.  (At least, I believe this is
true.  Could one of you please confirm or deny?)  So if machine R
should reboot while the journal is non-empty, it will replay it,
causing fairly unpredictable on-disk corruption.


Here are my questions.

1) When can a read-only XFS mount write to the disk, exactly?

2) If I do a "sync" on machine W (and perform no further writes), will
that truncate the journal?

3) What am I missing?


If your answer is "Please do not do this; get a clustered filesystem",
then trust me, you are preaching to the choir.  But these systems are
already in use and unlikely to be replaced soon, so at this point my
job is to find out what the exact risks are.  Any information will be
appreciated.

Thanks!

 - Pat

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