トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS


パーティション操作

parted

パーティションテーブルの保管方法はmsdos方式とgpt方式がある。

# parted /dev/sda print

Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  107MB   107MB   primary  ext3         boot
 2      107MB   10.7GB  10.6GB  primary               lvm

Information: Don't forget to update /etc/fstab, if necessary.

LVM

ファイルシステム

ext2/ext3

  • fsckのタイミングを変更する(extファイルシステム)
    ext2/ext3ファイルシステムはマウント回数ないし前回のfsckからの日数に応じてマウント時にfsckが走る。このタイミングの確認方法と変更方法を述べる。
    • 確認方法
      # tune2fs -l /dev/sda1
      tune2fs 1.38 (30-Jun-2005)
      Filesystem volume name:   /tmp
      Last mounted on:          <not available>
      Filesystem UUID:          ec13809c-1224-40b2-9f8d-39fb409d2a8d
      Filesystem magic number:  0xEF53
      Filesystem revision #:    1 (dynamic)
      Filesystem features:      has_journal resize_inode filetype needs_recovery  sparse_super
      Default mount options:    (none)
      Filesystem state:         clean
      Errors behavior:          Continue
      Filesystem OS type:       Linux
      Inode count:              32000
      Block count:              127984
      Reserved block count:     6399
      Free blocks:              117992
      Free inodes:              31958
      First block:              1
      Block size:               1024
      Fragment size:            1024
      Reserved GDT blocks:      256
      Blocks per group:         8192
      Fragments per group:      8192
      Inodes per group:         2000
      Inode blocks per group:   250
      Filesystem created:       Sat Oct 18 08:25:54 2008
      Last mount time:          Sat Oct 18 12:48:35 2008
      Last write time:          Mon Oct 20 10:25:21 2008
      Mount count:              7
      Maximum mount count:      27
      Last checked:             Sat Oct 18 08:25:54 2008
      Check interval:           15552000 (6 months)
      Next check after:         Thu Apr 16 08:25:54 2009
      Reserved blocks uid:      0 (user root)
      Reserved blocks gid:      0 (group root)
      First inode:              11
      Inode size:               128
      Journal inode:            8
      Default directory hash:   tea
      Directory Hash Seed:      a6087dca-8022-4b9b-99af-25e1ad6ae886
      Journal backup:           inode blocks
      このうち、Mount Countが現在のマウント回数。Maximun mount countがfsckが実行されるマウント回数となる。
      Last Checkedは最後にfsckが実行された日付。Check Intervalはfsckを実行する間隔を示す。
  • 変更方法
    マウント回数によるfsckタイミング変更
    # tune2fs -c 2 /dev/sda1
    tune2fs 1.38 (30-Jun-2005)
    Setting maximal mount count to 2
    fsck実行間隔の変更 - d(day),m(month),y(year)で指定することが可能。
    [root@inasa03 root]# tune2fs -i 3d /dev/sda1
    tune2fs 1.38 (30-Jun-2005)
    Setting interval between checks to 259200 seconds
    http://blog.dc-d.jp/archives/63.html

Counter: 3739, today: 1, yesterday: 1