etcfstab

xiaoxiao2021-03-06  53

1 FSTAB file role

File / etc / fstab is stored in the system information in the system. When the file is set correctly, you can load a file system through the "Mount / DirectoryName" command, each file system corresponds to a separate row, and the fields in each row have spaces or TAB keys. At the same time, FSCK, MOUNT, UMOUNT uses the program.

2. FSTAB file format

Below is a routine of the / etc / fatab file:

FS_SPEC FS_FILE FS_TYPE FS_OPTIONS FS_DUMP FS_PASS

/ DEV / HDA1 / EXT2 Defaults 1 1

FS_SPEC - This field defines the device or remote file system where you want to load, for a general local block device: IDE device is generally described as / dev / hdaxn, x is the IDE equipment channel (A, B, OR c), N represents partition number; SCSI device is described as / dev / sdaxn. For NFS situations, formats are generally

:

For example: `knuth.aeb.nl: / '. For ProCFS, use `proc 'to define.

FS_FILE - This field describes the desired file system loaded directory points, for the SWAP device, which is none; for the load directory name contains space, use 40 to represent spaces.

FS_TYPE - Defines the file system on the device, which is generally common file type EXT2 (common file type of Linux device), Vfat (FAT32 format of Windows system), NTFS, ISO9600, etc.

FS_OPTIONS - Specifies the file system that loads the device is a specific parameter option that needs to be used, and multiple parameters are separated by commas. For most systems use "defaults" to meet the needs. Other common options include:

Option meaning

RO loads the file system in read-only mode

Sync does not buffer the write operation of the device, which prevents the file system in the case of abnormal shutdown, but it reduces the computer speed.

User allows normal users to load the file system

Quota enforces disk quota limit on this file system

NOAUTO does not use the mount -a command (such as system startup) load the file system

fs_dump - This option is used by the "dump" command to check that a file system should be dump with multiple fast frequencies. If you do not need to dump, set this field to 0

FS_PASS - This field is used by the fsck command to determine the order in which the file system that needs to be scanned at startup, the root file system "/" to the value of the field should be 1, and the other file system should be 2. If the file system does not need to scan at startup, set this field 0

3. Sample file

# / Etc / fstab

/ DEV / HDA9 SWAP SWAP DEFAULTS 0 0

/ DEV / HDA1 / EXT2 Defaults 1 1

/ dev / hda5 / home extra2 defaults 1 1

/ DEV / HDA6 / USR EXT2 Defaults 1 1

/ DEV / HDA7 / USR / LOCAL EXT2 DEFAULTS 1 1 1

/ DEV / HDA8 / VAR EXT2 DEFAULTS 1 1

/ dev / hdb / cdrom iso9660 noauto, user 0 0none / proc Proc defaults 0 0

None / dev / pts devpts gid = 5, Mode = 620 0 0

转载请注明原文地址:https://www.9cbs.com/read-115358.html

New Post(0)