
我在 fstab 中使用以下命令安裝了 SAMBA:
//source/files /mnt/files cifs user,_netdev,cache=none,credentials=/usr/src/access.smb 0 0
然後我有以下 mount --bind 行:
/mnt/files /var/www/html/data none defaults,bind 0 0
但第二個安裝不起作用。如果我重新啟動計算機,則只有第一個安裝有效。我需要手動安裝第二個(使用綁定)
請問有人可以幫助我嗎?我在 Unix Stack Exchange 上看到這篇文章,但我不明白:https://unix.stackexchange.com/questions/216287/how-do-i-set-up-bind-mounts-on-startup- Correctly-in-the-systemd-world
提前致謝。
答案1
像這樣的事情:
/mnt/files /var/www/html/data none x-systemd.requires=/mnt/files,x-systemd.automount,bind 0 0