From: Amir Goldstein <amir73il@gmail.com>
To: Carl Karsten <carl@nextdayvideo.com>
Cc: overlayfs <linux-unionfs@vger.kernel.org>
Subject: Re: nfs server serving ... wrong mount?
Date: Thu, 21 Oct 2021 10:09:24 +0300 [thread overview]
Message-ID: <CAOQ4uxgN50djKrqE4FYhC0pNpHdp5HDyQcSQX4+dHqOYp_NY6A@mail.gmail.com> (raw)
In-Reply-To: <CADmzSSjy+bzPUus3xO2zT_USEKZYJ7WBOCbOiF+ro3EDoipXqg@mail.gmail.com>
On Thu, Oct 21, 2021 at 12:51 AM Carl Karsten <carl@nextdayvideo.com> wrote:
>
> I have 2 overlayfs monts.
>
> I can nfs export one or the other fine, but not both at the same time,
> the client gets the wrong files.
Hi Carl,
Thanks for the daily overlayfs riddles ;-)
This is not an overlayfs issue. It's nfs exports configuration issue.
Please read the documentation of fsid export option.
Disk filesystems have uuid so they don't need explicit identification.
Overlayfs does not have a stable UUID.
>
> server hosthame negk bullseye ext4
> client twist ubuntu
>
> juser@negk:~$ cat /etc/exports
> # /srv/nfs/rpi/buster/boot/merged *(ro,sync,no_subtree_check,no_root_squash)
> /srv/nfs/rpi/buster/root/merged *(ro,sync,no_subtree_check,no_root_squash)
In this case, "root" is auto assigned fsid 1
>
> juser@negk:~$ ls /srv/nfs/rpi/buster/boot/merged
> bcm2708-rpi-b.dtb bcm2710-rpi-3-b-plus.dtb fixup4cd.dat
> kernel7.img start4.elf
> (snip)
>
> juser@negk:~$ ls /srv/nfs/rpi/buster/root/merged
> bin boot dev etc home lib lost+found media mnt opt proc
> root run sbin srv sys tmp usr var
>
> carl@twist:~/mnt$ sudo mount -t nfs negk:/srv/nfs/rpi/buster/root/merged nfs
> carl@twist:~/mnt$ ls nfs
> bin boot dev etc home lib lost+found media mnt opt proc
> root run sbin srv sys tmp usr var
> carl@twist:~/mnt$ sudo umount nfs
>
> # enable root in negk exports...
I think you meant enable "boot"
and is that case "boot" gets assigned fsid 1 and "root" gets reassigned fsid 2
>
> carl@twist:~/mnt$ sudo mount -t nfs negk:/srv/nfs/rpi/buster/root/merged nfs
> carl@twist:~/mnt$ ls nfs
> bcm2708-rpi-b.dtb bcm2710-rpi-3-b-plus.dtb fixup4cd.dat
> kernel7.img start4.elf
> (snip)
>
It is a bit surprising to me that you get the wrong export after a clean mount,
but it doesn't change the core configuration issue.
Perhaps nfs client has some fsid cache or you have a deferred umount in
the system of negk:/srv/nfs/rpi/buster/root/merged (e.g. due to spawned mount
ns or something) and then the "new" nfs mount uses the old resolved fsid 1.
In any case, when exporting more than one non-disk filesystem, you should
use explicit fsid.
Thanks,
Amir.
next prev parent reply other threads:[~2021-10-21 7:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-20 21:50 nfs server serving ... wrong mount? Carl Karsten
2021-10-21 7:09 ` Amir Goldstein [this message]
2021-10-21 8:10 ` Carl Karsten
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=CAOQ4uxgN50djKrqE4FYhC0pNpHdp5HDyQcSQX4+dHqOYp_NY6A@mail.gmail.com \
--to=amir73il@gmail.com \
--cc=carl@nextdayvideo.com \
--cc=linux-unionfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).