CubieBoard2サーバが起動しなくなった問題(解決済み)
ファイル置き場やproxyに使っているCubieBoard2(NetBSD/evbarm 7.1)が先週当たりから応答しない。とりあえずシリアルケーブルで母艦と繋いでみる。
wd0 at atabus0 drive 0 wd0: <Hitachi HTS545050B9A300> wd0: 465 GB, 969021 cyl, 16 head, 63 sec, 512 bytes/sect x 976773168 sectors boot device: wd0 root on wd0a dumps on wd0b /: replaying log to memory root file system type: ffs Sun Jun 4 01:45:20 JST 2017 Starting root file system check: panic: kernel diagnostic assertion "oldsize != VSIZENOTSET || pgend > oldsize" failed: file "/home/star/work/netbsd/src/sys/uvm/uvm_vnode.c", line 355 Stopped in pid 21.1 (fsck) at netbsd:cpu_Debugger+0x4: bx r14 db{1}>
おぉうなんでか知らんけどfsckでkernel panicしとる。最初はディスクが死んだかと思ったけどシングルユーザモードでなら起動できたのでSMARTを見た感じでは大丈夫…そうな気がする(これの読み方をよく知らない)。
# atactl /dev/wd0 smart status SMART supported, SMART enabled id value thresh crit collect reliability description raw 1 100 62 yes online positive Raw read error rate 0 2 100 40 yes offline positive Throughput performance 0 3 243 33 yes online positive Spin-up time 30064771072 4 100 0 no online positive Start/stop count 636 5 100 5 yes online positive Reallocated sector count 0 7 100 67 yes online positive Seek error rate 0 8 100 40 yes offline positive Seek time performance 0 9 30 0 no online positive Power-on hours count 30862 10 100 60 yes online positive Spin retry count 0 12 100 0 no online positive Device power cycle count 615 191 100 0 no online positive G-sense error rate 0 192 100 0 no online positive Power-off retract count 77 193 37 0 no online positive Load cycle count 638702 194 171 0 no online positive Temperature 32 Lifetime min/max 10/56 196 100 0 no online positive Reallocated event count 0 197 100 0 no online positive Current pending sector 0 198 100 0 no offline positive Offline uncorrectable 0 199 200 0 no online positive Ultra DMA CRC error count 145240 223 100 0 no online positive Load/unload retry count 0
であればfsckをかけてチェックをかけて…ってそこでkernel panicしてるのか。とりあえず試しにディスクを引っこ抜いて母艦に繋げてそちらで動かしてみる。
$ sudo fsck_ffs -fy /dev/wd3a ** /dev/rwd3a ** File system is already clean ** Last Mounted on /mnt ** Phase 1 - Check Blocks and Sizes UNKNOWN FILE TYPE I=11210928 CLEAR? yes UNKNOWN FILE TYPE I=11210929 CLEAR? yes UNKNOWN FILE TYPE I=11210930 CLEAR? yes : :
おぉ動いた。そしてエラーまみれだ orz
そしてfsckをかけ終わったディスクをCubieBoard2に戻したら無事に起動するようになったのでとりあえずそのまま動かすことに。NetBSD 8が出たころに改めてディスク診断をかけてクリーンインストールかなー。