nfs mount option nolock worked for me.
edit: you can add the 'nolock' to mount options in fstab, or 'mount -o nolock,remount /mount_path' to mount it on demand. I had an issue with samba creating a mount on an nfs volume and it created infinite open connections until I added this mount option.
Answer from Jay303 on serverfault.comnfs mount option nolock worked for me.
edit: you can add the 'nolock' to mount options in fstab, or 'mount -o nolock,remount /mount_path' to mount it on demand. I had an issue with samba creating a mount on an nfs volume and it created infinite open connections until I added this mount option.
The Samba manual mentions that re-exporting a NFS mountpoint over Samba does not work correctly. NFS is not 100% POSIX compatible, so some things work differently than what Samba expects.
I.e. you should run Samba on the same server where you run the NFS service, exporting the local disks directly.
Videos
Hello freenas enthusiasts.
I would like to share the same folder on my network via smb and NFS. I know this is not usually recommended because a user could be updating the file via one of these protocols while another is also accessing it, and because it's not recommended I haven't found a whole lot on it. That being said, this is only in my home network, I will be the only one using it, and this network location will be for miscellaneous files mostly (mainly ISO's for booting vms from). I would like to have my nfs clients (mostly ESXi hosts) see all the files I upload from my windows clients.
I've currently created a pool with a NFS share (let's call it /mnt/POOL) and a windowset under this with an ACL set up (/mnt/POOL/windowset). I can connect via SMB and upload files which go to that windowset folder, but I can't see these files on my nfs clients. Alternatively, I can connect to the base nfs share and upload files to that on my nfs clients, but I cannot see these at all on my windows clients. I've tried changing the smb share to just use /mnt/POOL, but then I get an error about editing a base pool ACL and while I can see all the files in the base pool on my windows clients, I cannot edit them at all or upload any new files.
I know this isn't generally recommended, but I would really appreciate some assistance with this. In addition, if there is a better approach to this, please let me know. I know permissions can cause this to be difficult, but I did something similar back when I was running unraid, so I'm hoping it's not impossible. Thanks for reading!
I've previously used samba in the past, it's appealing, it easily connects on windows, kinda easily on macOS, with some tuning, works well on Linux. Mounting an nfs share on Linux is much easier, which is what I'd like to start using for my linux desktop. I've also started recently using a lot of self-hosted applications, and would find utility in file_browser. NFS and Samba don't seem to be working too well with each other, and I expect the same thing to happen when I setup file browser through docker.
Overall I'm asking for help finding an approach, or help with pursuing a solution. I could use the same directory, but currently that seems like a headache not worth fixing(only b/c I feel like there's a simpler way). In using the same directory for samba and nfs, the mount done through samba functions, the mount from nfs is read only. Or, if there's a way to make different directory then that would work, but idk how to do that, and googling hasn't helped that idea.
regarding samba not working with an NFS mounted folder...
getsebool -a | grep samba
by default samba_share_nfs is off.
doing an setsebool -P samba_share_nfs on
fixes that. The -P is for persistence, otherwise it'll be off again after reboot.
It isn't a good idea to use Samba to share an NFS mount, so I can't recommend you do this. NFS uses nfsv4 acls and Samba doesn't.