Last-modified: 2019-12-14 (土) 03:47:54
LinuxTips/ext4のmountオプションを変えたい

概要

ファイルシステムのオプションを変更してマウントする方法です。
パフォーマンスアップや挙動を変更することが可能です。

手順

  1. /etc/fstabを編集
    Everything is expanded.Everything is shortened.
      1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
    
    -
    |
    !
    -
    !
     
    -
    |
    |
    !
     
    -
    !
    
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # Debian Squeezeの場合
    UUID=87a27404-292f-433d-b515-3e80474c2e02 /               ext4    errors=remount-ro 0       1
    # Ubuntu 12.10の場合
    /dev/root / ext4 defaults,noatime 0 0
     
    # コメントの説明通り、オプション指定は左から4つめ
    # 複数のオプションを指定する場合は[,]で区切る
    # 例. relatimeを追加
    UUID=87a27404-292f-433d-b515-3e80474c2e02 /               ext4    errors=remount-ro,relatime 0       1
     
    # UUIDの調べ方
    ls -l /dev/disk/by-uuid/
  2. 再起動
  3. 確認
    Everything is expanded.Everything is shortened.
      1
    
     
    
    mount

検証時の環境