[root@hnl ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sun Jan 29 14:11:48 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_hnl-lv_root / ext4 defaults 1 1
UUID=cc890fc9-a6a8-4c7c-8cc1-65f3f43037cb /boot ext4
defaults 1 2
/dev/mapper/vg_hnl-lv_home /home ext4 defaults 1 2
/dev/mapper/vg_hnl-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
The /etc/fstab file is used to mount two different kinds of devices: you can mount file systems and system devices. In Listing 5.8, the first four lines are used to mount file systems, and the last four lines are used to mount specific system devices.
To specify how the mounts should be performed, six different columns are used:
-
The name of the device to be mounted.
-
The directory where this device should be mounted.
-
The file system that should be used to mount the device.
-
Specific mount options: use defaults if you want to perform the mount without any specific options.
-
Dump support: use 1 if you want the dump backup utility to be able to make a backup of this device, and use 0 if you don't. It's good practice to enable dump support for all real file systems.
-
fsck support: use 0 if you never want this file system to be checked automatically while booting. Use 1 for the root file system. This ensures that it will be checked before anything else takes place. Use 2 for all other file systems.
本文详细解析了Linux系统中fstab文件的作用、组成部分及其关键配置项,帮助理解如何管理设备挂载。
1985

被折叠的 条评论
为什么被折叠?



