From: Gionatan Danti <g.danti@assyoma.it>
To: linux-xfs@vger.kernel.org
Subject: Re: XFS and multiple mounts protection (aka preventing multiple mounts)
Date: Fri, 5 May 2017 13:52:53 +0200 [thread overview]
Message-ID: <2e45f5c8-0b8f-ef99-a8a5-cd3ebb89911e@assyoma.it> (raw)
In-Reply-To: <20170505113219.dovbzhbmt6e3ooem@eorzea.usersys.redhat.com>
On 05/05/2017 13:32, Carlos Maiolino wrote:
>
> This is not true, XFS can't identify mounts on different systems. It is not a
> shared or clustered filesystem.
>
Ok, this confirm my finding.
To reiterate: there is *no* method to prevent multiple mounts in XFS, right?
> At the worst case, it would need to store something to disk saying the
> filesystem is already mounted, and the mount process would need to read it
> before actually mounting the filesystem. Nothing though would prevent a race
> between two systems, or even make the filesystem unmountable after a crash,
> needing something like xfs_repair to clean some "is_mounted" flag, which would
> trash one of the reasons why we have a journal (fast recovery without needing an
> fsck before mounting).
>
EXT4 uses a "keepalive" approach: enabling the "mmp" feature (which
require kernel 3.10+), a specific on-disk structure is continuously
(each 5 seconds, by default) updated with a timestamp by the mounting
machine. If another machine tries to mount the filesystem, it sees the
mmp structure changing and it refuse to mount.
It's not perfect, but better than nothing ;)
Regards.
--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.danti@assyoma.it - info@assyoma.it
GPG public key ID: FF5F32A8
next prev parent reply other threads:[~2017-05-05 11:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-05 10:29 XFS and multiple mounts protection (aka preventing multiple mounts) Gionatan Danti
2017-05-05 11:32 ` Carlos Maiolino
2017-05-05 11:52 ` Gionatan Danti [this message]
2017-05-05 12:25 ` Carlos Maiolino
2017-05-05 13:19 ` Gionatan Danti
2017-05-05 16:08 ` Emmanuel Florac
2017-05-10 8:12 ` Carlos Maiolino
2017-05-10 8:19 ` Gionatan Danti
2017-05-05 19:20 ` Eric Sandeen
2017-05-08 9:34 ` Gionatan Danti
2017-05-08 13:26 ` Eric Sandeen
2017-05-08 13:36 ` Gionatan Danti
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=2e45f5c8-0b8f-ef99-a8a5-cd3ebb89911e@assyoma.it \
--to=g.danti@assyoma.it \
--cc=linux-xfs@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.