Re: [RFC] ext3 multi-mount protection

"Stephen C. Tweedie" <[email protected]>
Newsgroups gmane.comp.file-systems.ext2.devel
Message-ID <[email protected]>
Hi,

On Fri, 2006-07-14 at 18:10 +0800, Qi Yong wrote:

> > We've developed a small patch for ext3 to prevent the filesystem from
> > being mounted concurrently on two nodes.  Is there general interest in
> > this becoming part of ext3/ext4?

> The attached is our mmp v3.0 kernel patch against the current vanilla kernel in git.
> (mmp: multi-mount protection)

> On an active fs, kalived updates "sequence number" in "alive block" at 5-second intervals.
> At mount time, the alive block is read and tested to detect if the mounting fs is actively used
> by other nodes or not. If the fs is active, mount fails; otherwise start kalived and continue.

I'm not sure that the filesystem is the right place to do this.  It will
probably work OK for lightly loaded systems and to protect against some
common administration accidents, but for real protection in a clustered
environment we need to care about a lot more failure scenarios.  One
pretty common failure mode is temporary timeouts on a node, either a
device driver timing out and suspending IO for some seconds, or
something like VM pressure causing bits of the kernel to effectively
lock up for a while.  A 10-second kick-the-sequence-number loop isn't
going to protect against those.

If we do decide we want this, then I don't think that the kernel is the
right place for it.  That's for two reasons --- first, it's never going
to get all the hard cases (timeouts etc) right anyway, so reducing the
point of having it in the kernel; but secondly, we need it for e2fsck
and tune2fs just as much as for mount.

Cheers,
 Stephen




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.