EXT4-fs error

2014/03/10

Raspberry Piの8GB SDカードをddして複製したメディアで起動するとエラーが出る。
複数のプロセスなので、名前解決かなにかに関係するファイルかも。

[ 883.560203] EXT4-fs error (device mmcblk0p6): ext4_lookup:1437: inode #279526: comm ntpd: deleted inode referenced: 333291
[ 1067.730286] EXT4-fs error (device mmcblk0p6): ext4_lookup:1437: inode #279526: comm sshd: deleted inode referenced: 333291

fsckかけてみる。

pi@raspberrypi ~ $ sudo fsck -n /dev/mmcblk0p6
fsck from util-linux 2.20.1
e2fsck 1.42.5 (29-Jul-2012)
Warning! /dev/mmcblk0p6 is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
root contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Entry ‘resolv.conf’ in /etc (279526) has deleted/unused inode 333291. Clear? no

Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences: -1164487
Fix? no

Inode bitmap differences: -333291
Fix? no

root: ********** WARNING: Filesystem still has errors **********

root: 84312/404800 files (0.1% non-contiguous), 625855/1618944 blocks

ああ、そのファイルだといろいろアクセスしてきそう。
マウント状態だとfsckで修正できないので、Ubuntuが起動しているPCにSDカードを
刺してコマンド実行。

hoge@nuc-linux:~$ sudo fsck -fy /dev/sdb6
[sudo] password for hoge:
fsck from util-linux 2.20.1
e2fsck 1.42 (29-Nov-2011)
Pass 1: Checking iノードs, blocks, and sizes
Pass 2: Checking ディレクトリ structure
Entry ‘resolv.conf’ in /etc (279526) has 削除/unused iノード 333291. クリア? yes

Pass 3: Checking ディレクトリ connectivity
Pass 4: Checking reference counts
Pass 5: Checking グループ summary information
Block ビットマップ differences: -1164487
修正? yes

Free blocks count wrong for グループ #35 (10188, counted=10189).
修正? yes

Free blocks count wrong (993084, counted=993085).
修正? yes

Iノード ビットマップ differences: -333291
修正? yes

Free iノードs count wrong for グループ #41 (8095, counted=8096).
修正? yes

Free iノードs count wrong (320488, counted=320489).
修正? yes

root: ***** ファイルシステムは変更されました *****
root: 84311/404800 files (0.1% non-contiguous), 625859/1618944 blocks

Raspberry Piに戻してエラーが出ないことを確認。
ファイルも大丈夫そうですよっと。

pi@raspberrypi ~ $ cat /etc/resolv.conf
nameserver 192.168.1.1
nameserver 8.8.8.8
nameserver 8.8.4.4

Tags:

Comments are closed.