最後更新: 2023-03-06
目錄
- fstab format
- 通用 Options
- mount 時的 delay
- mount by Device/Label/UUID
fstab format
# <device> <mount point> <type> <options> <dump> <fsck>
device: 可以用 label, uuid, path 去表達
fsck: To determine the order in which filesystem checks are done at boot time
The root filesystem 1, Other filesystems 2.
(Defaults to zero (don’t check the filesystem))
通用 Options
defaults
default options: rw, suid, dev, exec, auto, nouser, and async
exec / noexec
Permit/Prevent the execution of binaries from the filesystem.
suid/nosuid
Permit/Block the operation of suid, and sgid bits.
noauto
do not mount when "mount -a" is given (e.g., at boot time)
relatime
updates the access time only if the previous access time was earlier than the current modify or change time.
In addition, since Linux 2.6.30, the access time is always updated if the previous access time was more than 24 hours old.
mount 時的 delay
nofail
當 Device 不存在時, 依然 boot 入系統 (ignored if absent)
P.S. 設定等待 Device 的時間
# Defaul: 90s
x-systemd.device-timeout=15s
nobootwait
which can be applied to non-remote filesystems to explicitly instruct mountall(8) not to hold up the boot for them
_netdev
The filesystem resides on a device that requires network access
used to prevent the system from attempting to mount these filesystems
until the network has been enabled on the system
mount by Device/Label/UUID
By Label
LABEL=NAME /media/usb xfs noatime 0 0
By UUID
UUID=x-x-x-x-x /media/usb xfs noatime 0 0
另見