飞牛 OS 很好用,但飞牛 OS 很好用不太可能。 TrueNAS 只是一个很纯粹的 NAS 系统,没有网页浏览图片的功能。macOS 对于网络目录的支持很差,在大量文件的 SMB 目录里会卡死。所以使用其他的轻量 NAS 系统挂载 TrueNAS 的分享是一个简单的解决方案。 飞牛 OS 0.8.36 还并不支持把 SMB 目录像本地目录一样看待,所以需要手动修改配置文件。 TL;DR这个文件nano /etc/systemd/system/mount-cifs.service
内容这样 [Unit]Description=Mount CIFS shares after local disks and network are upAfter=local-fs.target network-online.target trim_main.serviceWants=local-fs.target network-online.target trim_main.service[Service]Type=oneshotExecStart=/usr/local/bin/mount-cifs.shRemainAfterExit=yes[Install]WantedBy=multi-user.target那个文件nano /usr/local/bin/mount-cifs.sh
内容这样,很普通的 mount 命令格式。 #!/bin/bashmount -t cifs //10.8.2.10/landis /vol1/1000/landis -o username=sen,password=yourpassword,nofail,uid=1000,gid=1001mount -t cifs //10.8.2.10/archive /vol1/1000/archive -o username=sen,password=yourpassword,nofail,uid=1000,gid=1001mount -t cifs //10.8.2.10/backup /vol1/1000/backup -o username=sen,password=yourpassword,nofail,uid=1000,gid=1001打开服务sudo systemctl enable mount-cifs.servicesudo systemctl start mount-cifs.service
题外话截止到 0.8.36 版本,飞牛 OS 的远程访问还未支持两步验证,可能会有爆破风险,需要注意安全。 macOS 和 iOS 的 SMB 支持太烂了,一个 SMB 目录里有 4000 张小图片会使文件浏览器加载很久。 飞牛 OS 手动挂载的 SMB 目录不支持回收站功能。
|