NFS/SMB share of ZFS-Pool

MisterY

Renowned Member
Oct 10, 2016
140
4
83
37
Hi,

I would like to share my ZFS-Pool "tank" (not the boot-pool) with my VMs and LXC with NFS or Samba. I tried it with NFS and Samba itself, but it didn't work because of some permisison problems (user and group and permissions were set correctly; with a Win-Guest it is working, but not with Linux...)

I read that zfs has some features about sharing the pool with NFS.
I took this guide here: https://docs.oracle.com/cd/E23824_01/html/821-1448/gayne.html

and I tested it with:

sudo zfs set share=ZFS,path=/tank/nfs,prot=nfs tank/nfs
cannot open 'tank/nfs': dataset does not exist
user@pve:~$ sudo zfs set share=ZFS,path=/tank/nfs,prot=nfs tank
cannot set property for 'tank': invalid property 'share'
user@pve:~$ sudo zfs set share=ZFS,path=/tank/nfs,prot=nfs /tank
cannot open '/tank': invalid dataset name

sudo zfs set sharenfs=on /tank/nfs
cannot open '/tank/nfs': invalid dataset name
what am I doing wrong?

I set before this a NFS and Sambashare without "zfs set" and both can be seen by clients, but not mounted or written on it..

edit: this worked:
sudo zfs set sharesmb=on tank

but: Linux-Guests are not allowed to write on it. Why?
 
Last edited:
Hello misterY,

did you check the aclmode?
I had some issues like you on freenas aswell.

Set from zfs aclmode=restricted to passthrough and see if this helps.

Best regards
 
still no writing-permissions :(

I read somewhere about if you set mp0 SIZE=0 it will be mounted as directory. Maybe will this solving the problems for the LXC? I would like to test it, but I can't set 0GB in the webgui..

edit: in the lxc.conf it is setable. This works now like a charm :) but only for LXC. In VMs this sadly doesn't work
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!