最終更新:2017-04-26 (水) 02:49:03 (2549d)  

Linux/etc/fstab
Top / Linux / etc / fstab

種々のプログラムがファイルシステムのマウント状況を確認するために利用するファイル

  • CentOS 6
    file systemmount-pointtypeoptionsdumppass
    マウントされるパーティションやストレージデバイスマウントされるマウントポイントファイルシステムタイプファイルシステムのマウントオプションdumpユーティリティによって使われるfsckの順番
    /dev/mapper/vg_dev-lv_root/ext4defaults11
    UUID=c21d8cbc-cd06-4f2f-8e68-684321be1306/bootext4defaults12
    /dev/mapper/vg_dev-lv_swapswap?swapdefaults00
    tmpfs/dev/shmtmpfsdefaults00
    devpts/dev/ptsdevpts?gid=5,mode=62000
    sysfs/syssysfsdefaults00
    proc/procproc?defaults00
  • dump:1だと対象
  • pass:起動時にfsckする
    • 0は対象外、1はルートファイルシステム、2はそれ以外を対象とする場合

type

Ubuntu

Ubuntu 13.04

  • # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/sda1 during installation
    UUID=24509ea8-c241-409f-b27d-6deb4b367d6c /               ext4    errors=remount-ro 0       1
    # swap was on /dev/sda5 during installation
    UUID=f75b3796-ffed-4595-8aa3-911f5b2d9cab none            swap    sw              0       0

Ubuntu 14.04.5

  • # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/sda1 during installation
    UUID=ca45735a-3297-4ca2-a73e-eb4472940772 /               ext4    errors=remount-ro 0       1
    # swap was on /dev/sda5 during installation
    UUID=062e221a-4037-419c-879c-00839664a9e3 none            swap    sw              0       0

UUID

  • UUID指定だと一意のIDなので順番の影響をうけない
  • blkid
    $ sudo blkid /dev/sda1
    /dev/sda1: UUID="24509ea8-c241-409f-b27d-6deb4b367d6c" TYPE="ext4" 
  • 一覧
    blkid -o list

Linux From Scratch

関連

参考