pve下设置nfs,把ZFS分享出来
nfs 是按照访问地址来限制的默认没密码
安装通过pvetools或者
apt install nfs-kernel-server nfs-common
vi /etc/exports
要共享的目录 共享的网端/掩码(rw,syn,no_root_squash,no_subtree_check,crossmnt)
确保局域网绝对安全才给no_root_squash
systemctl restart nfs-server
对zfs的挂载点得使用,不然挂不上去
zfs set sharenfs=on <pool>
smb的特殊设置
zfs set sharesmb=on <pool>
跟PVE的甲骨文不一样。。。
smb开启follow symlinks = yes
因为ZFS不支持多挂载点。。。只能软链了
vi /etc/samba/smb.conf
wide links = yes
allow insecure wide links = yes
放在[global]下面,子项不会起作用。。。可能造成不安全,看怎么用
systemctl restart smb
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html
还得给可以写入的目录777不然wide link拿不到权限。。。
参考: https://cshihong.github.io/2018/10/16/NFS%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%90%AD%E5%BB%BA%E4%B8%8E%E9%85%8D%E7%BD%AE/
https://docs.oracle.com/en/operating-systems/solaris/oracle-solaris/11.4/manage-smb/how-create-smb-share-zfs.html#GUID-0E991115-8B9C-42D7-9B95-47ED8670745A