因此,今天我更新了我的/etc/fstab
NAS,將一些 NFS 共享掛載到我的 NAS,雖然我可以在終端中鍵入並成功掛載它們,但fstab
重新啟動後似乎無法完全執行。
我正在運行 Mint,但我不確定這是否重要。
這是我的fstab
文件。
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/mint--vg-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda2 during installation
UUID=0fad24fa-b1e5-48aa-b738-a06f214207b9 /boot ext2 defaults 0 2
# /boot/efi was on /dev/sda1 during installation
UUID=3715-6F02 /boot/efi vfat umask=0077 0 1
/dev/mapper/mint--vg-swap_1 none swap sw 0 0
#3/13/2018 NFS shares to Synology
10.0.0.5:/volume1/homes/alex2wr /media/alex2wr nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0
10.0.0.5:/volume1/homes/alex2wr/Downloads ~/Downloads nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0
10.0.0.5:/volume1/video ~/Videos nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0
10.0.0.5:/volume1/photo ~/Pictures nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0
答案1
我認為問題在於使用的相對路徑。如果您在控制台中運行:
mount -t nfs 10.0.0.5:/volume1/video ~/Videos
之所以有效,是因為~
指的是使用者的主資料夾。當您重新啟動系統時~
,不會發生這種情況,因此您必須編寫絕對路徑,例如:
10.0.0.5:/volume1/video /home/<username>/Videos