忍者ブログ
最新記事
(08/05)
(07/11)
(06/25)
(06/24)
(06/24)
ブログ内検索
カテゴリー
プロフィール
HN:
Toy Scooter
性別:
男性
職業:
はいぱー情報通信・電気くりえーたー
趣味:
読書
自己紹介:
wiki始めました・・・
//
統一性の無いblogになってきました、 資格とかLinuxとか・・・。
[73]  [69]  [72]  [71]  [70]  [68]  [67]  [66]  [65]  [64]  [63
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

ファイルシステム変換、調査、出力等を
おさらいしてみました。

対象デバイスを指定せず実行してみました、
ファイルシステムにダメージを
起こすかもしれないという事で実行を取消し、
通常はread onlyモード等でファイルシステムを
チェックします。
----------------------------------------
debian:~#
debian:~# fsck -r
fsck 1.40-WIP (14-Nov-2006)
e2fsck 1.40-WIP (14-Nov-2006)
/dev/hda1 is mounted.

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage
.

Do you really want to continue (y/n)? no

check aborted.
debian:~#
----------------------------------------

マウントしていないテストパーティションにて
ファイルシステムをチェック、
rオプションは対話モードなのですが、異常が無い為、
正常終了です。
r:Interactively repair?
----------------------------------------
debian:~#
debian:~# fsck -r /dev/hda4
fsck 1.40-WIP (14-Nov-2006)
e2fsck 1.40-WIP (14-Nov-2006)
/dev/hda4: clean, 11/66528 files, 18695/265072 blocks
debian:~#
----------------------------------------

Nオプションでコマンド自体は実行せず、
実行内容のみ表示します。
Don't execute:Not executeの略?
----------------------------------------
debian:~#
debian:~# fsck -N /dev/hda4
fsck 1.40-WIP (14-Nov-2006)
[/sbin/fsck.ext3 (1) -- /dev/hda4] fsck.ext3 /dev/hda4
debian:~#
----------------------------------------

/dev/hda4の内容を詳細表示してみました、
inodeのサイズ迄、表示されます。
----------------------------------------
debian:~#
debian:~# dumpe2fs /dev/hda4
dumpe2fs 1.40-WIP (14-Nov-2006)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          f630933d-79c2-4938-bbea-4f4b1f4e1c40
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal resize_inode dir_index filetype sparse_super
Filesystem flags:         signed directory hash
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              66528
Block count:              265072
Reserved block count:     13253
Free blocks:              246377
Free inodes:              66517
First block:              1
Block size:               1024
Fragment size:            1024
Reserved GDT blocks:      256
Blocks per group:         8192
Fragments per group:      8192
Inodes per group:         2016
Inode blocks per group:   252
Filesystem created:       Mon Sep 22 03:10:53 2008
Last mount time:          n/a
Last write time:          Mon Sep 22 03:10:55 2008
Mount count:              0
Maximum mount count:      22
Last checked:             Mon Sep 22 03:10:53 2008
Check interval:           15552000 (6 months)
Next check after:         Sat Mar 21 03:10:53 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:      3a130154-55ca-4837-a73e-229f728fe018
Journal backup:           inode blocks
Journal size:             8M


Group 0: (Blocks 1-8192)
  Primary superblock at 1, Group descriptors at 2-3
  Reserved GDT blocks at 4-259
  Block bitmap at 260 (+259), Inode bitmap at 261 (+260)
  Inode table at 262-513 (+261)
  0 free blocks, 2005 free inodes, 2 directories
  Free blocks:
  Free inodes: 12-2016
Group 1: (Blocks 8193-16384)
  Backup superblock at 8193, Group descriptors at 8194-8195
  Reserved GDT blocks at 8196-8451
  Block bitmap at 8452 (+259), Inode bitmap at 8453 (+260)
  Inode table at 8454-8705 (+261)
  7118 free blocks, 2016 free inodes, 0 directories
  Free blocks: 9267-16384
  Free inodes: 2017-4032


Group 32: (Blocks 262145-265071)
  Block bitmap at 262145 (+0), Inode bitmap at 262146 (+1)
  Inode table at 262147-262398 (+2)
  2673 free blocks, 2016 free inodes, 0 directories
  Free blocks: 262399-265071
  Free inodes: 64513-66528
debian:~#
----------------------------------------

オプションなしでmke2fsを実行、
ファイルシステムをext2に戻します。
----------------------------------------
debian:~#
debian:~# mke2fs /dev/hda4
mke2fs 1.40-WIP (14-Nov-2006)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
66528 inodes, 265072 blocks
13253 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67633152
33 block groups
8192 blocks per group, 8192 fragments per group
2016 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729, 204801, 221185

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
debian:~#
----------------------------------------

tune2fsコマンドをjオプションにて実行、
ファイルシステムをext3に戻してみます。
----------------------------------------
debian:~#
debian:~# tune2fs -j /dev/hda4
tune2fs 1.40-WIP (14-Nov-2006)
Creating journal inode: done
This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
debian:~#
debian:~# fsck -N /dev/hda4
fsck 1.40-WIP (14-Nov-2006)
[/sbin/fsck.ext3 (1) -- /dev/hda4] fsck.ext3 /dev/hda4
debian:~#
----------------------------------------

今回の独り言
おさらいは大切ですね・・・。

PR
この記事にコメントする
お名前
タイトル
文字色
メールアドレス
URL
コメント
パスワード   Vodafone絵文字 i-mode絵文字 Ezweb絵文字
この記事へのトラックバック
この記事にトラックバックする:
この記事のURL:       
忍者ブログ*[PR]