jailed NFS over zfs

I am unable to export NSF share that is sitting on zfs. NFS is jailed, and jail is sitting on its own zfs filesystem.

NFS service fires up in jail, but /var/log/messages shows
Code:
Oct 15 22:35:19 pxeboot mountd[25008]: Can't delete exports for V4:
Oct 15 22:35:19 pxeboot mountd[25008]: can't delete exports for /: Operation not permitted 
Oct 15 22:35:19 pxeboot mountd[25008]: can't change attributes for /b
Oct 15 22:35:19 pxeboot mountd[25008]: bad exports list line /b -ro -alldirs

This is jail's /etc/exports
Code:
/b -ro -alldirs

That's all.
But like I said /b is sitting on tank/ezjail/pxeboot which is separate filesystem.

I tried applying different solutions but couldn't figure it out.

I have nonjailed setup that's using both NFSv3 and NFSv4 and it's working fine.
 
bbzz said:
I have nonjailed setup that's using both NFSv3 and NFSv4 and it's working fine.
Make sure they're all bound to the host's IP address. By default they'll listen on all addresses, including the ones belonging to the jails.
 
SirDice said:
Make sure they're all bound to the host's IP address. By default they'll listen on all addresses, including the ones belonging to the jails.

I made it so that server accepts connections only from 127.0.0.1, since I tunnel ssh to it first.
 
I'm wondering where that V4: comes from. Is that from previous attempts or is that really in your jail's /etc/exports?

Also check if you haven't set any sharenfs flags for that filesystem. That may interfere as it's likely to get added on the host's /etc/zfs/exports instead of the jail's.
 
No, not in /etc/zfs/exports.

Not sure where that V4 comes form either. I'm only running NFSv3 in jail together with tftp/dhcp for pxebooting.

edit:

I do have V4: / line in "global" /etc/exports. Maybe that's what confusing it. But then how to keep this line for host NFSv4 and have a working configuration in jail.

EDIT2: Disabled NFS on host, but I still get same error in jail.
 
Similar problem here.

Seems like exporting NFS from jail is not possible. Will have to try with net/unfs3 or just exporting from global set. If anyone managed to get NFS running from jail please let me know.
 
Back
Top