Zfs Tips
Page content
ZFS Tips for Home NAS
Automatic Mount when Boot
事实上,ZFS 现在已经通过设置多个 systemd .service 和 .target 来开启自动挂载功能。1
sudo systemctl enable zfs-import-cache.service
sudo systemctl disable zfs-import-scan.service
sudo systemctl enable zfs-mount.service
sudo systemctl enable zfs-share.service
sudo systemctl enable zfs-zed.service
sudo systemctl enable zfs.target
Automatic Share with Samba using sharesmb property
- 安装并配置 Samba , 关键是要在
/etc/samba/smb.conf
里配置好[global]
部分2:
[global]
...
usershare path = /var/lib/samba/usershares
usershare max shares = 100
usershare allow guests = yes
usershare owner only = no
- 建立
/var/lib/samba/usershares
目录,并设置权限:
sudo mkdir -p /var/lib/samba/usershares
sudo chmod +t /var/lib/samba/usershares
- 启动或者重启 Samba 服务:
sudo systemctl restart smbd.service
- 自动设置 ZFS dataset 分享:
sudo zfs set sharesmb=on /tank/volume