На примере настройки автоматической проверки ФС при каждой загрузке ОС/монтировании ФС.
Вывод содержимого суперблоков ФС /dev/mapper/srv--01-root
root@srv-01:~# tune2fs -l /dev/mapper/srv--01-root
tune2fs 1.41.12 (17-May-2010)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: 009e6e5b-1c22-49b2-9d69-3e04bfa3bb61
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
Filesystem flags: signed_directory_hash
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 484800
Block count: 1937408
Reserved block count: 96870
Free blocks: 1516041
Free inodes: 419114
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 472
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8080
Inode blocks per group: 505
Filesystem created: Thu Aug 18 00:45:22 2011
Last mount time: Wed Aug 31 05:54:14 2011
Last write time: Thu Aug 18 00:53:35 2011
Mount count: 8
Maximum mount count: 38
Last checked: Thu Aug 18 00:45:22 2011
Check interval: 15552000 (6 months)
Next check after: Mon Feb 13 23:45:22 2012
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
First orphan inode: 88888
Default directory hash: half_md4
Directory Hash Seed: c5b5d5cc-b79c-40ce-bfea-90778dcb6e33
Journal backup: inode blocks
Включение автоматической проверки файловой система с помощью fsck при каждой загрузке ОС
tune2fs -c 1 /dev/mapper/srv--01-root
tune2fs 1.41.12 (17-May-2010)
Setting maximal mount count to 1
Вывод содержимого суперблоков ФС /dev/mapper/srv--01-root
root@srv-01:~# tune2fs -l /dev/mapper/srv--01-root
tune2fs 1.41.12 (17-May-2010)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: 009e6e5b-1c22-49b2-9d69-3e04bfa3bb61
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
Filesystem flags: signed_directory_hash
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 484800
Block count: 1937408
Reserved block count: 96870
Free blocks: 1516041
Free inodes: 419114
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 472
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8080
Inode blocks per group: 505
Filesystem created: Thu Aug 18 00:45:22 2011
Last mount time: Wed Aug 31 05:54:14 2011
Last write time: Thu Aug 18 00:53:35 2011
Mount count: 8
Maximum mount count: 38
Last checked: Thu Aug 18 00:45:22 2011
Check interval: 15552000 (6 months)
Next check after: Mon Feb 13 23:45:22 2012
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
First orphan inode: 88888
Default directory hash: half_md4
Directory Hash Seed: c5b5d5cc-b79c-40ce-bfea-90778dcb6e33
Journal backup: inode blocks
Включение автоматической проверки файловой система с помощью fsck при каждой загрузке ОС
tune2fs -c 1 /dev/mapper/srv--01-root
tune2fs 1.41.12 (17-May-2010)
Setting maximal mount count to 1
Смотрим еще раз параметры ФС
tune2fs -l /dev/mapper/srv--01-root | grep -i mount
Last mounted on: <not available>
Default mount options: (none)
Last mount time: Wed Aug 31 06:03:18 2011
Mount count: 9
Maximum mount count: 1
Т.е. если Maximum mount count становится равным или меньшим, чем Mount count происходит проверка ФС
Комментариев нет:
Отправить комментарий