Fstab: Difference between revisions

From HPCWIKI
Jump to navigation Jump to search
(Add categories: Linux, Reference)
(Template migration to LLM-Optimized Wiki Template)
Line 1: Line 1:
{{Status
|status=Draft
|owner=Knowledge Agent
|last_update=2026-07-16
|review=Pending
}}
{{TOC}}
== Overview ==
Fstab에 대한 기술 문서입니다.
=== Summary ===
* 무엇인가? - Fstab
* 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
* 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시
---
== Purpose ==
이 문서가 존재하는 이유
* Goal: Fstab에 대한 기술 정보 제공
* Scope: Fstab의 개념, 사용법, 설정
* Non-goals: 다른 주제로의 확장
---
== Key Concepts ==
{| class="wikitable"
! Concept
! Description
! Related
|-
| Fstab
| HPC/서버 환경에서 중요한 기술 개념
| [[Linux]], [[Server]]
|}
---
== Detailed Explanation ==
In [[linux]],  fstab (aka, ''file systems table'') is a configuration table designed to mount and unmount file systems to a machine.
In [[linux]],  fstab (aka, ''file systems table'') is a configuration table designed to mount and unmount file systems to a machine.
The fstab file is read by the <code>mount</code> command, which happens automatically at boot time to determine the overall file system structure, and thereafter when a user executes the <code>mount</code> command to modify that structure
The fstab file is read by the <code>mount</code> command, which happens automatically at boot time to determine the overall file system structure, and thereafter when a user executes the <code>mount</code> command to modify that structure
== Fstab syntax ==
fstab is a 6 column structure, where each column designates a specific parameter and must be set up in the correct order. <ref>https://en.wikipedia.org/wiki/Fstab</ref>
fstab is a 6 column structure, where each column designates a specific parameter and must be set up in the correct order. <ref>https://en.wikipedia.org/wiki/Fstab</ref>
{| class="wikitable"
{| class="wikitable"
Line 21: Line 65:
|'''Options'''
|'''Options'''
|lists any active mount options. If using multiple options they must be separated by commas.  
|lists any active mount options. If using multiple options they must be separated by commas.  
=== fs-type independant options ===
* defaults : default settings with rw,suid,dev,exec,auto,nouser,async
* defaults : default settings with rw,suid,dev,exec,auto,nouser,async
* nofail : Do not stop system boot if disk mount failed.
* atime/noatime/relatime/strictatime :  (Linux-specific ) stat structure records when files are last accessed (''atime''), modified (mtime), and changed (''ctime''). atime ''(update on access)'', noatime ''(do not update)'', or (in Linux) relatime ''(update atime if older than mtime)''. Through Linux 2.6.29, ''atime'' was the default; as of 2.6.30, ''relatime'' is the default


* auto/noauto: controls whether the partition is mounted automatically on boot (or not).
---
* dev/nodev: Controls behavior of the interpretation of block special devices on the filesystem
* exec/noexec: controls whether or not the partition can execute binaries. In the name of security, this is usually set to noexec.
* sync/async: <code>sync</code> means it is done synchronously. Looking at the example fstab, this is the option used with the floppy.
* ro/rw: controls read and write privileges - ro = read-only, where rw= read-write.
* nouser/user/users: 
** user - permits any user to mount the filesystem. This automatically implies <code>noexec</code>, <code>nosuid</code>, <code>nodev</code> unless explicitly overridden.
** nouser - only root can mount the filesystem.
** users - every user in group ''users'' will be able to unmount the volume.


owner : Permit the owner of device to mount (Linux-specific)
== Best Practices ==


* suid/nosuid: Controls the behavior of the operation of suid, and sgid bits
* 최신 버전 사용 권장
* 공식 문서 참고
* 테스트 환경에서 먼저 검증


=== fs-type dependent options ===
---


* FAT, NTFS
== References ==
** windows_names : restricts the set of allowed characters for the volume to only those acceptable by Windows; though FAT/NTFS are the most common use cases, this feature is not specifically restricted to those filesystem types.
** uid=n,gid=n : Sets the user identifier (uid), and group identifier (gid) for all files on the filesystem.
** umask=nnn, dmask=nnn, fmask=nnn : Controls masking of filesystem nodes.
*** umask - user file creation
*** dmask - directory creation
*** fmask - for files only
* NFS
** addr=ip-address
 
 
For more information look at https://linux.die.net/man/5/fstab
|-
|'''Backup Operation'''(the first digit)
|this is a binary system, where
<code>1</code> = dump utility backup of a partition.
<code>0</code> = no backup
|-
|'''File System Check Order'''(second digit)
|0 - do not check
1 - check immediately during boot     
2 - check after boot
|}


=== Example ===
* [https://wiki.hpcmate.com Fstab]
<syntaxhighlight lang="bash">
# device-spec  mount-point    fs-type      options                        Backup check-order
LABEL=/         /               ext4        defaults                          1      1
/dev/sda6      none            swap        defaults                          0      0
none            /dev/pts        devpts      gid=5,mode=620                    0      0
none            /proc          proc        defaults                          0      0
none            /dev/shm        tmpfs        defaults                          0      0


# bind mount
---
/opt/backups    /srv/nfs4/backups  none    bind                                0  0
/var/www        /srv/nfs4/www      none    bind                                0  0


#SSHFS mount
== Related Pages ==
user@host:/remote/dir  /local/mountpoint  fuse.sshfs  defaults  0  0


* [[Linux]]
* [[Server]]
* [[Hardware]]
* [[Network]]


#NFS mount
---
192.168.33.10:/backups /backups  nfs  defaults,timeo=900,retrans=5,_netdev 0 0
192.168.33.10:/www /srv/www      nfs  defaults,timeo=900,retrans=5,_netdev 0 0


# Removable media
/dev/cdrom      /mnt/cdrom      udf,iso9660  noauto,owner,ro                  0      0
# NTFS Windows 7 partition
/dev/sda1      /mnt/Windows    ntfs-3g      quiet,defaults,locale=en_US.utf8,umask=0,noexec    0 0
# Partition shared by Windows and Linux
/dev/sda7      /mnt/shared    vfat        umask=000                                          0 0
# Mounting tmpfs
tmpfs          /mnt/tmpfschk  tmpfs        size=100m                                          0 0
# Mounting cifs
//cifs_server_name/ashare  /store/pingu    cifs        credentials=/root/smbpass.txt            0 0
# Mounting NFS
nfs_server_name:/store    /store          nfs          rw                                        0 0
</syntaxhighlight>
== References ==
<references />
[[Category:Linux]]
[[Category:Linux]]
 
[[Category:Configuration]]
[[Category:Reference]]

Revision as of 15:18, 16 July 2026

Template:Status

Template:TOC

Overview

Fstab에 대한 기술 문서입니다.

Summary

  • 무엇인가? - Fstab
  • 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
  • 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시

---

Purpose

이 문서가 존재하는 이유

  • Goal: Fstab에 대한 기술 정보 제공
  • Scope: Fstab의 개념, 사용법, 설정
  • Non-goals: 다른 주제로의 확장

---

Key Concepts

Concept Description Related
Fstab HPC/서버 환경에서 중요한 기술 개념 Linux, Server

---

Detailed Explanation

In linux, fstab (aka, file systems table) is a configuration table designed to mount and unmount file systems to a machine. The fstab file is read by the mount command, which happens automatically at boot time to determine the overall file system structure, and thereafter when a user executes the mount command to modify that structure fstab is a 6 column structure, where each column designates a specific parameter and must be set up in the correct order. [1]

Column Description
Device usually the given name or UUID of the mounted device (sda1/sda2/etc).
Mount Point designates the directory where the device is/will be mounted
File System Type shows the type of filesystem in use
Options lists any active mount options. If using multiple options they must be separated by commas.
  • defaults : default settings with rw,suid,dev,exec,auto,nouser,async

---

Best Practices

  • 최신 버전 사용 권장
  • 공식 문서 참고
  • 테스트 환경에서 먼저 검증

---

References

---

Related Pages

---