NFS - can't export nullfs mount

I have a working NFS server in VNET jail, but when i replace shared folder with nullfs mount, then something breaks.

/etc/exports:
Code:
/shared -ro 10.0.30.27
/shared -ro 10.0.30.14

If /shared is directory inside jail, then NFS server works. When i nullfs mount to the same directory in jail, then NFS server does not work.

/usr/local/bastille/jails/nfs/fstab:

Code:
/usr/local/bastille/releases/14.0-RELEASE /usr/local/bastille/jails/nfs/root/.bastille nullfs ro 0 0
/ssdpool/test   /usr/local/bastille/jails/nfs/root/shared   nullfs rw 0 0

From /var/log/messages:
Code:
Aug 22 13:55:29 nfs mountd[48781]: can't delete exports for /: Invalid argument Invalid fstype
Aug 22 13:55:29 nfs mountd[48781]: can't export /shared Invalid fstype
Aug 22 13:55:29 nfs mountd[48781]: bad exports list line '/shared -ro 10.0.30.27'
Aug 22 13:55:29 nfs mountd[48781]: can't export /shared Invalid fstype
Aug 22 13:55:29 nfs mountd[48781]: bad exports list line '/shared -ro 10.0.30.14'

From /etc/rc.conf:
Code:
...
rpcbind_enable="YES"
nfs_server_enable="YES"
nfs_server_flags="-t"
mountd_enable="YES"

File system in jail host is ZFS.

Is it possible to NFS share nullfs mounted directory?
 
After upgrading FreeBSD from 14.0-RELEASE to 14.1-RELEASE the messages changed:

/var/log/messages
:
Code:
Aug 23 09:33:51 nfs mountd[77211]: Warning: exporting /shared exports entire [restricted] file system
Aug 23 09:33:51 nfs syslogd: last message repeated 1 times
Aug 23 09:33:51 nfs mountd[77211]: can't export /shared
Aug 23 09:33:51 nfs mountd[77211]: bad exports list line '/shared -ro 10.0.30.27'
Aug 23 09:33:51 nfs mountd[77211]: Warning: exporting /shared exports entire [restricted] file system
Aug 23 09:33:51 nfs mountd[77211]: can't export /shared
Aug 23 09:33:51 nfs mountd[77211]: bad exports list line '/shared -ro 10.0.30.14'

After exporting /, the errors disappeared, but NFS mount did not show the nullfs mounted content in directory, but instead showed the directory content before nullfs mount.

/etc/exports
:
Code:
/ -ro 10.0.30.27
/ -ro 10.0.30.14

It is as if mountd does not recognise nullfs mount.

Any thoughts on this would be greatly appreciated.
 
Back
Top