mount -a 不挂载Fstab文件
mount -a does not mount Fstab file
我的 /etc/fstab
文件中有以下内容:
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
sv-01:/mnt/UEF/home/user/Videos/complete /home/user/Videos nfs defaults,noauto,user 0 0
当我发出命令 sudo mount -a -v
时,我得到以下输出
mount: proc already mounted on /proc
mount: /dev/mmcblk0p1 already mounted on /boot
nothing was mounted
但是当我复制粘贴上面的代码段并发出以下命令时,文件夹会完美安装。
sudo mount sv-01:/mnt/UEF/home/user/Videos/complete /home/user/Videos
可能是什么原因造成的?
您为 sv-01 指定了 "noauto" 参数:/mnt/UEF/home/user/Videos/complete。
来自挂载手册:
mount -a [-t type] [-O optlist]
(usually given in a bootscript) causes all filesystems mentioned in
fstab (of the proper type and/or having or not having the proper
options) to be mounted as indicated, except for those whose line
contains the noauto keyword. Adding the -F option will make mount
fork, so that the filesystems are mounted simultaneously.
我的 /etc/fstab
文件中有以下内容:
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
sv-01:/mnt/UEF/home/user/Videos/complete /home/user/Videos nfs defaults,noauto,user 0 0
当我发出命令 sudo mount -a -v
时,我得到以下输出
mount: proc already mounted on /proc
mount: /dev/mmcblk0p1 already mounted on /boot
nothing was mounted
但是当我复制粘贴上面的代码段并发出以下命令时,文件夹会完美安装。
sudo mount sv-01:/mnt/UEF/home/user/Videos/complete /home/user/Videos
可能是什么原因造成的?
您为 sv-01 指定了 "noauto" 参数:/mnt/UEF/home/user/Videos/complete。
来自挂载手册:
mount -a [-t type] [-O optlist]
(usually given in a bootscript) causes all filesystems mentioned in fstab (of the proper type and/or having or not having the proper options) to be mounted as indicated, except for those whose line contains the noauto keyword. Adding the -F option will make mount fork, so that the filesystems are mounted simultaneously.