Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jan 2020 22:47:00 +0000
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        mike tancsa <mike@sentex.net>, freebsd-fs <freebsd-fs@freebsd.org>
Subject:   Re: export a zfs snapshot over nfs
Message-ID:  <YQBPR0101MB14271300837964892E578CC4DD0E0@YQBPR0101MB1427.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <62fc92d6-7a31-9dac-d237-082cc71d0dd9@sentex.net>
References:  <62fc92d6-7a31-9dac-d237-082cc71d0dd9@sentex.net>

next in thread | previous in thread | raw e-mail | index | archive | help
mike tancsa wrote:=0A=
>On a backup server, I want to export a zfs snapshot via nfs, but I cant=0A=
>seem to do it.=0A=
>=0A=
>given the snapshot is=0A=
>backup2/zrepl/sink2/nfserver1/images/vms@zrepl_20190902_122114_000=0A=
>=0A=
>I can do something locally like=0A=
>=0A=
>mkdir /tmpmount=0A=
>=0A=
>add=0A=
>=0A=
>/tmpmount       -maproot=3Dnobody   192.168.13.36=0A=
>=0A=
>and from the client machine mount /tmpmount.=0A=
>=0A=
>But if I do on the server=0A=
>=0A=
>mount -t zfs=0A=
>backup2/zrepl/sink2/nfserver1/images/vms@zrepl_20190902_122114_000 /tmpmou=
nt=0A=
>=0A=
>and then try and mount from the client, I get a permission denied.=0A=
>=0A=
>I can work around it by creating a quick clone of the snapshot and=0A=
>mounting the clone.  But was curious as to why I cant do it the first way =
?=0A=
>=0A=
>server is releng12 and nfsv3=0A=
I am happy to say I never use ZFS, but if I were to guess, it will have som=
ething=0A=
to do with the fsid of the file system.=0A=
=0A=
NFSv3 mounts do not cross server mount points (which are recognized by a ch=
ange=0A=
in the FSID). I believe that a snapshot appears to be a different file syst=
em (ie. different=0A=
FSID). ZFS does some sort of weird "pseudo mount" of snapshots, I think?=0A=
=0A=
You did not mention doing a separate export line for the snapshot, which wo=
uld be=0A=
needed to mount it, if it is a different FSID.=0A=
--> You could try...=0A=
1 - Adding an export line to /etc/exports for the snapshot's directory path=
.=0A=
or=0A=
2 - Use an NFSv4 mount of a higher level directory, since NFSv4 does cross =
server=0A=
     mountpoints/FSID changes.=0A=
=0A=
rick=0A=
=0A=
    ---Mike=0A=
=0A=
=0A=
_______________________________________________=0A=
freebsd-fs@freebsd.org mailing list=0A=
https://lists.freebsd.org/mailman/listinfo/freebsd-fs=0A=
To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"=0A=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YQBPR0101MB14271300837964892E578CC4DD0E0>