/etc/fstab/ko

From Gentoo Wiki
< /etc
Jump to:navigation Jump to:search
This page is a translated version of the page /etc/fstab and the translation is 10% complete.
Outdated translations are marked like this.
Resources

fstab (file system table) 파일(/etc/fstab)은 기본 파일 시스템이 특히 부팅 시 마운트되는 방법과 위치를 정의하는 구성 파일입니다.

/etc/fstab의 각 줄은 하나의 파티션, 드라이브 혹은 네트워크 공유를 마운트하는데 필요한 설정을 담고 있습니다. 각 줄은 6열로 되어 있으며 공백 문자는 탭 문자로 구분됩니다. 각 열은 다음과 같습니다:

  1. The device file, UUID or label or other means of locating the partition or data source.
  2. The mount point, where the data is to be attached to the filesystem.
  3. The filesystem type. See man 5 fstab for more supported file system types.
  4. Options, including if the filesystem should be mounted at boot.
  5. Adjusts the archiving schedule for the partition (used by app-arch/dump package). 0 disables, 1 enables the feature.
  6. Controls the order in which fsck checks the device/partition for errors at boot time. The root device should be 1. Other partitions should be either 2 (to check after root) or 0 (to disable checking for that partition altogether).

An example for the root device:

파일 /etc/fstab
/dev/sda1   /   ext4   defaults   0   1

Special characters can be escaped by using their octal representation from an ASCII table. For example, if the name of the mount point contains spaces or tabs these can be escaped as \040 and \011 respectively.

For more detailed information see man 5 fstab.

요령
Options such as discard may seem useful for SSDs, though it is generally recommended to use periodic trim jobs instead.

UUIDs and labels

In the first column, a UUID can be used instead of a device file:

파일 /etc/fstabUsing a UUID for the root partition
UUID=339df6e7-91a8-4cf9-a43f-7f7b3db533c6   /   ext4   defaults   0   1

Alternatively, a LABEL can be used:

파일 /etc/fstabUsing a label for the root partition
LABEL=Gentoo   /   ext4   defaults   0   1

Depending on the partition table (e.g. the GUID Partition Table "GPT"), PARTLABEL can be used:

파일 /etc/fstabUsing a label for the root partition
PARTLABEL=Gentoo   /   ext4   defaults   0   1

Please read this for details on how to retrieve UUIDs and labels.

Services

The following OpenRC services read the fstab to mount or manage the filesystems:

  • localmount - Mount disks and swap according to fstab.
  • netmount - Mount network shares according to fstab.
  • fsck - Check and repair filesystems according to fstab.
  • root - Mount the root filesystem read/write.

These services supplement the fstab, if the filesystems are not explicitly stated:

  • sysfs - Mount the /sys filesystem.
  • devfs - Mount system critical filesystems in /dev.

Check that they are enabled to start at boot time:

root #rc-update show

See also

External resources