ファイルシステムの整合性をチェックして修復したい

UNIXサーバ構築 OnTheVMware

unixコマンド逆引きを例を用いて解説
HOME > UNIXコマンド逆引きリファレンス >

ファイルシステムの整合性をチェックして修復したい

ファイルシステムの整合性をチェックして修復したい


スポンサードリンク


【説明】
システムがハングアップした場合などに、ハードディスク内に破損したファイルがあるかどうかをfsckコマンドでチェックします。fsckコマンドを実行する場合は、必ずシングルユーザモードで起動し、対象とするファイルシステムをアンマウントしておく必要があります。マウントしかつマルチユーザモードで実行してしまうとチェック中に他のプロセスによってファイルシステムにデータが書き込まれた場合に、不具合が生じる可能性があります。
fsckコマンドの詳細を見る
シングルユーザモードにいますぐ切り替えたい

例) チェック修復対象をデバイス形式で指定し、fsckコマンドを実行します。。
[root@localhost ~]# fsck /dev/hda1
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
/dev/hda1 is mounted.

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

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

ext3 recovery flag clear, but journal has data.
Run journal anyway<y>? yes

/boot: recovering journal
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/boot: 40/26104 files (10.0% non-contiguous), 15254/104388 blocks


スポンサードリンク
 HOME / 免責事項 / サイトマップ /  問い合わせ
Copyright (C) 2008  UNIXサーバ構築 OnTheVMware  All rights reserved





スポンサードリンク