SMART error (CurrentPendingSector) detected on host
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[Guard]]
#contents
*smartdでエラーメッセージを受け取ったときの応急対応・コマ...
*** # grep -i "smartd" /var/log/messages | tail [#q00a8915]
Jan 12 11:09:01 guard smartd[596]: Device: /dev/ada0, 96...
Jan 12 11:39:01 guard smartd[596]: Device: /dev/ada0, 96...
Jan 12 12:09:01 guard smartd[596]: Device: /dev/ada0, 96...
Jan 12 12:09:01 guard smartd[596]: Device: /dev/ada0, pr...
Jan 12 12:09:01 guard smartd[596]: Device: /dev/ada0, Se...
Jan 12 12:39:01 guard smartd[596]: Device: /dev/ada0, 88...
Jan 12 13:09:01 guard smartd[596]: Device: /dev/ada0, 88...
Jan 12 13:39:00 guard smartd[596]: Device: /dev/ada0, 80...
Jan 12 13:39:01 guard smartd[596]: Device: /dev/ada0, Se...
Jan 12 14:09:00 guard smartd[596]: Device: /dev/ada0, 80...
*** # smartctl /dev/ada0 --log=selftest [#pb39d335]
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-RELEASE-p4 a...
Copyright (C) 2002-17, Bruce Allen, Christian Franke, ww...
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaini...
# 1 Extended offline Completed: read failure 1...
# 2 Extended offline Completed: read failure 1...
# 3 Extended offline Completed: read failure 1...
# 4 Short offline Completed without error 0...
# 5 Extended offline Completed: read failure 4...
# 6 Short offline Completed without error 0...
# 7 Short offline Completed without error 0...
# 8 Short offline Completed without error 0...
#
ブロックサイズが 32768 の場合
b = (int)(975890088 * 512 / 32768) = (int) 15248282 (小...
*** # sysctl kern.geom.debugflags=0x10 [#v8eb0d4f]
kern.geom.debugflags: 0 -> 16
*** # dd if=/dev/zero of=/dev/ada0 bs=32768 count=1 seek=...
1+0 records in
1+0 records out
32768 bytes transferred in 0.000234 secs (140105438 byte...
*** # sysctl kern.geom.debugflags=0 [#rc7012c8]
kern.geom.debugflags: 16 -> 0
*** # smartctl --test=long /dev/ada0 [#v22d083d]
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-RELEASE-p4 a...
Copyright (C) 2002-17, Bruce Allen, Christian Franke, ww...
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routi...
Drive command "Execute SMART Extended self-test routine ...
Testing has begun.
Please wait 62 minutes for test to complete.
Test will complete after Fri Jan 12 15:35:51 2018
Use smartctl -X to abort test.
----
http://hiro-system.blog.ocn.ne.jp/blog/2010/11/smartd_995...
http://www.wizard-limit.net/mt/pc/archives/2011_08.html
**smartdでエラーメッセージを受け取ったときの応急対応 [#q2...
grep -i "smartd" /var/log/messages | tail
guard# grep -i "smartd" /var/log/messages | tail
Jan 11 12:39:00 guard smartd[596]: Device: /dev/ada0, 10...
Jan 11 13:09:00 guard smartd[596]: Device: /dev/ada0, 10...
Jan 11 13:39:00 guard smartd[596]: Device: /dev/ada0, 10...
**sector errorを修復を試みる。 [#nb685c9b]
# smartctl /dev/ada0 --log=selftest
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-RELEASE-p4 a...
Copyright (C) 2002-17, Bruce Allen, Christian Franke, ww...
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaini...
# 1 Extended offline Completed: read failure 4...
# 2 Short offline Completed without error 0...
# 3 Short offline Completed without error 0...
# 4 Short offline Completed without error 0...
# 5 Short offline Completed without error 0...
# 6 Short offline Completed without error 0...
# 7 Short offline Completed without error 0...
# 8 Short offline Completed without error 0...
# 9 Extended offline Completed without error 0...
#10 Short offline Completed without error 0...
#11 Short offline Completed without error 0...
#12 Short offline Completed without error 0...
#13 Short offline Completed without error 0...
#14 Short offline Completed without error 0...
#15 Short offline Completed without error 0...
#16 Short offline Completed without error 0...
#17 Extended offline Completed without error 0...
#18 Short offline Completed without error 0...
guard#
# fdisk
******* Working on device /dev/ada0 *******
parameters extracted from in-core disklabel are:
cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl)
Figures below won't work with BIOS for partitions not in...
parameters to be used for BIOS calculations are:
cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 64, size 976773103 (476939 Meg), flag 80 (acti...
beg: cyl 0/ head 1/ sector 2;
end: cyl 1023/ head 255/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
# disklabel -A /dev/ada0s1
# /dev/ada0s1:
type: unknown
disk:
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 969020
sectors/unit: 976773103
rpm: 3600
interleave: 0
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize bps/...
a: 968884224 0 4.2BSD 0 0 0
b: 7888878 968884224 swap
c: 976773103 0 unused 0 0 ...
ということで、bsize が0となってしまう・・・?
**ファイルシステムのブロックサイズを調べるには、次のコマ...
# dumpfs /some/filesystem | grep '^bsize'
ということなので、
guard# dumpfs /dev/ad4s1 | grep '^bsize'
bsize 16384 shift 14 mask 0xffffc000
piano2ndだと、gpart list すると、ada0p2がファイル領域のよ...
root@piano2nd:~ # dumpfs /dev/ada0p2 | grep '^bsize'
bsize 32768 shift 15 mask 0xffff8000
小さなファイルのstatを見てみて確認
# stat .screenrc
114 5056131 -rw-r--r-- 1 root wheel 10102700 54 "Jan 12 ...
http://d.hatena.ne.jp/parasporospa/touch/searchdiary?word...
によれば、st_blksize ファイルシステム I/O 操作での最適な...
**以下の公式からseek箇所を算出。 [#t7d208fe]
http://hiro-system.blog.ocn.ne.jp/blog/2010/11/smartd_995...
http://see-take.blogspot.jp/2010/01/hddsmart.html
では、以下の様な公式が掲載されていますが、これはFreeBSDだ...
b = (int)((L-S)*512/B)
where:
b = File System block number
B = File system block size in bytes
L = LBA of bad sector
S = Starting sector of partition as shown by fdis...
and (int) denotes the integer part.
S = 0、B = 4096、L = 577493400を公式に代入。
b = (int)(1043624 * 512 / 4096) = (int) 130453 (小数点以...
で、こちらとなります。
b = (int)((L-S)*512/B)
where:
b = File System block number
B = File system block size in bytes (dumpfs 32768)
L = LBA of bad sector
S = Starting sector of partition as shown by fdisk
and (int) denotes the integer part.
S = 0、B = 32768、L = 577493400を公式に代入。
b = (int)(577493400 * 512 / 32768) = (int) 9023334.375 (...
となった。該当箇所をddでゼロで埋める。
guard# dd if=/dev/zero of=/dev/ada0 bs=32768 count=1 see...
dd: /dev/ada0: Operation not permitted
と言われるので、ググって
guard# sysctl kern.geom.debugflags=0x10
kern.geom.debugflags: 0 -> 16
としてから、
guard# dd if=/dev/zero of=/dev/ada0 bs=32768 count=1 see...
guard# dd if=/dev/zero of=/dev/ada0 bs=32768 count=1 see...
1+0 records in
1+0 records out
16384 bytes transferred in 0.000281 secs (58286240 bytes...
と、書き換えて、
guard# sysctl kern.geom.debugflags=0
kern.geom.debugflags: 16 -> 0
お目に留まればもとへとかえす。
そして、正常にもどったかどうかチェック!
guard# smartctl --test=long /dev/ad4
smartctl 5.43 2012-06-30 r3573 [FreeBSD 8.1-RELEASE-p13 ...
Copyright (C) 2002-12 by Bruce Allen, http://smartmontoo...
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routi...
Drive command "Execute SMART Extended self-test routine ...
Testing has begun.
Please wait 40 minutes for test to complete.
Test will complete after Sat Feb 16 13:59:56 2013
Use smartctl -X to abort test.
guard#
・・・14時になったので
guard# smartctl /dev/ad4 --log=selftest
smartctl 5.43 2012-06-30 r3573 [FreeBSD 8.1-RELEASE-p13 ...
Copyright (C) 2002-12 by Bruce Allen, http://smartmontoo...
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaini...
# 1 Extended offline Completed without error 0...
# 2 Extended offline Completed: read failure 9...
# 3 Short offline Completed: read failure 9...
# 4 Short offline Completed: read failure 9...
# 5 Short offline Completed: read failure 9...
# 6 Short offline Completed: read failure 9...
# 7 Short offline Completed: read failure 9...
# 8 Short offline Completed: read failure 9...
# 9 Short offline Completed: read failure 9...
#10 Extended offline Completed: read failure 9...
#11 Short offline Completed: read failure 9...
#12 Short offline Completed: read failure 9...
#13 Short offline Completed: read failure 9...
#14 Short offline Completed: read failure 9...
#15 Short offline Completed: read failure 9...
#16 Short offline Completed: read failure 9...
#17 Short offline Completed: read failure 9...
#18 Extended offline Completed: read failure 9...
#19 Short offline Completed: read failure 9...
#20 Short offline Completed: read failure 9...
#21 Short offline Completed: read failure 9...
20 of 20 failed self-tests are outdated by newer success...
guard#
うまく、いったっぽい!( ´▽`)ノ
終了行:
[[Guard]]
#contents
*smartdでエラーメッセージを受け取ったときの応急対応・コマ...
*** # grep -i "smartd" /var/log/messages | tail [#q00a8915]
Jan 12 11:09:01 guard smartd[596]: Device: /dev/ada0, 96...
Jan 12 11:39:01 guard smartd[596]: Device: /dev/ada0, 96...
Jan 12 12:09:01 guard smartd[596]: Device: /dev/ada0, 96...
Jan 12 12:09:01 guard smartd[596]: Device: /dev/ada0, pr...
Jan 12 12:09:01 guard smartd[596]: Device: /dev/ada0, Se...
Jan 12 12:39:01 guard smartd[596]: Device: /dev/ada0, 88...
Jan 12 13:09:01 guard smartd[596]: Device: /dev/ada0, 88...
Jan 12 13:39:00 guard smartd[596]: Device: /dev/ada0, 80...
Jan 12 13:39:01 guard smartd[596]: Device: /dev/ada0, Se...
Jan 12 14:09:00 guard smartd[596]: Device: /dev/ada0, 80...
*** # smartctl /dev/ada0 --log=selftest [#pb39d335]
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-RELEASE-p4 a...
Copyright (C) 2002-17, Bruce Allen, Christian Franke, ww...
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaini...
# 1 Extended offline Completed: read failure 1...
# 2 Extended offline Completed: read failure 1...
# 3 Extended offline Completed: read failure 1...
# 4 Short offline Completed without error 0...
# 5 Extended offline Completed: read failure 4...
# 6 Short offline Completed without error 0...
# 7 Short offline Completed without error 0...
# 8 Short offline Completed without error 0...
#
ブロックサイズが 32768 の場合
b = (int)(975890088 * 512 / 32768) = (int) 15248282 (小...
*** # sysctl kern.geom.debugflags=0x10 [#v8eb0d4f]
kern.geom.debugflags: 0 -> 16
*** # dd if=/dev/zero of=/dev/ada0 bs=32768 count=1 seek=...
1+0 records in
1+0 records out
32768 bytes transferred in 0.000234 secs (140105438 byte...
*** # sysctl kern.geom.debugflags=0 [#rc7012c8]
kern.geom.debugflags: 16 -> 0
*** # smartctl --test=long /dev/ada0 [#v22d083d]
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-RELEASE-p4 a...
Copyright (C) 2002-17, Bruce Allen, Christian Franke, ww...
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routi...
Drive command "Execute SMART Extended self-test routine ...
Testing has begun.
Please wait 62 minutes for test to complete.
Test will complete after Fri Jan 12 15:35:51 2018
Use smartctl -X to abort test.
----
http://hiro-system.blog.ocn.ne.jp/blog/2010/11/smartd_995...
http://www.wizard-limit.net/mt/pc/archives/2011_08.html
**smartdでエラーメッセージを受け取ったときの応急対応 [#q2...
grep -i "smartd" /var/log/messages | tail
guard# grep -i "smartd" /var/log/messages | tail
Jan 11 12:39:00 guard smartd[596]: Device: /dev/ada0, 10...
Jan 11 13:09:00 guard smartd[596]: Device: /dev/ada0, 10...
Jan 11 13:39:00 guard smartd[596]: Device: /dev/ada0, 10...
**sector errorを修復を試みる。 [#nb685c9b]
# smartctl /dev/ada0 --log=selftest
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-RELEASE-p4 a...
Copyright (C) 2002-17, Bruce Allen, Christian Franke, ww...
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaini...
# 1 Extended offline Completed: read failure 4...
# 2 Short offline Completed without error 0...
# 3 Short offline Completed without error 0...
# 4 Short offline Completed without error 0...
# 5 Short offline Completed without error 0...
# 6 Short offline Completed without error 0...
# 7 Short offline Completed without error 0...
# 8 Short offline Completed without error 0...
# 9 Extended offline Completed without error 0...
#10 Short offline Completed without error 0...
#11 Short offline Completed without error 0...
#12 Short offline Completed without error 0...
#13 Short offline Completed without error 0...
#14 Short offline Completed without error 0...
#15 Short offline Completed without error 0...
#16 Short offline Completed without error 0...
#17 Extended offline Completed without error 0...
#18 Short offline Completed without error 0...
guard#
# fdisk
******* Working on device /dev/ada0 *******
parameters extracted from in-core disklabel are:
cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl)
Figures below won't work with BIOS for partitions not in...
parameters to be used for BIOS calculations are:
cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 64, size 976773103 (476939 Meg), flag 80 (acti...
beg: cyl 0/ head 1/ sector 2;
end: cyl 1023/ head 255/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
# disklabel -A /dev/ada0s1
# /dev/ada0s1:
type: unknown
disk:
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 969020
sectors/unit: 976773103
rpm: 3600
interleave: 0
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize bps/...
a: 968884224 0 4.2BSD 0 0 0
b: 7888878 968884224 swap
c: 976773103 0 unused 0 0 ...
ということで、bsize が0となってしまう・・・?
**ファイルシステムのブロックサイズを調べるには、次のコマ...
# dumpfs /some/filesystem | grep '^bsize'
ということなので、
guard# dumpfs /dev/ad4s1 | grep '^bsize'
bsize 16384 shift 14 mask 0xffffc000
piano2ndだと、gpart list すると、ada0p2がファイル領域のよ...
root@piano2nd:~ # dumpfs /dev/ada0p2 | grep '^bsize'
bsize 32768 shift 15 mask 0xffff8000
小さなファイルのstatを見てみて確認
# stat .screenrc
114 5056131 -rw-r--r-- 1 root wheel 10102700 54 "Jan 12 ...
http://d.hatena.ne.jp/parasporospa/touch/searchdiary?word...
によれば、st_blksize ファイルシステム I/O 操作での最適な...
**以下の公式からseek箇所を算出。 [#t7d208fe]
http://hiro-system.blog.ocn.ne.jp/blog/2010/11/smartd_995...
http://see-take.blogspot.jp/2010/01/hddsmart.html
では、以下の様な公式が掲載されていますが、これはFreeBSDだ...
b = (int)((L-S)*512/B)
where:
b = File System block number
B = File system block size in bytes
L = LBA of bad sector
S = Starting sector of partition as shown by fdis...
and (int) denotes the integer part.
S = 0、B = 4096、L = 577493400を公式に代入。
b = (int)(1043624 * 512 / 4096) = (int) 130453 (小数点以...
で、こちらとなります。
b = (int)((L-S)*512/B)
where:
b = File System block number
B = File system block size in bytes (dumpfs 32768)
L = LBA of bad sector
S = Starting sector of partition as shown by fdisk
and (int) denotes the integer part.
S = 0、B = 32768、L = 577493400を公式に代入。
b = (int)(577493400 * 512 / 32768) = (int) 9023334.375 (...
となった。該当箇所をddでゼロで埋める。
guard# dd if=/dev/zero of=/dev/ada0 bs=32768 count=1 see...
dd: /dev/ada0: Operation not permitted
と言われるので、ググって
guard# sysctl kern.geom.debugflags=0x10
kern.geom.debugflags: 0 -> 16
としてから、
guard# dd if=/dev/zero of=/dev/ada0 bs=32768 count=1 see...
guard# dd if=/dev/zero of=/dev/ada0 bs=32768 count=1 see...
1+0 records in
1+0 records out
16384 bytes transferred in 0.000281 secs (58286240 bytes...
と、書き換えて、
guard# sysctl kern.geom.debugflags=0
kern.geom.debugflags: 16 -> 0
お目に留まればもとへとかえす。
そして、正常にもどったかどうかチェック!
guard# smartctl --test=long /dev/ad4
smartctl 5.43 2012-06-30 r3573 [FreeBSD 8.1-RELEASE-p13 ...
Copyright (C) 2002-12 by Bruce Allen, http://smartmontoo...
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routi...
Drive command "Execute SMART Extended self-test routine ...
Testing has begun.
Please wait 40 minutes for test to complete.
Test will complete after Sat Feb 16 13:59:56 2013
Use smartctl -X to abort test.
guard#
・・・14時になったので
guard# smartctl /dev/ad4 --log=selftest
smartctl 5.43 2012-06-30 r3573 [FreeBSD 8.1-RELEASE-p13 ...
Copyright (C) 2002-12 by Bruce Allen, http://smartmontoo...
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaini...
# 1 Extended offline Completed without error 0...
# 2 Extended offline Completed: read failure 9...
# 3 Short offline Completed: read failure 9...
# 4 Short offline Completed: read failure 9...
# 5 Short offline Completed: read failure 9...
# 6 Short offline Completed: read failure 9...
# 7 Short offline Completed: read failure 9...
# 8 Short offline Completed: read failure 9...
# 9 Short offline Completed: read failure 9...
#10 Extended offline Completed: read failure 9...
#11 Short offline Completed: read failure 9...
#12 Short offline Completed: read failure 9...
#13 Short offline Completed: read failure 9...
#14 Short offline Completed: read failure 9...
#15 Short offline Completed: read failure 9...
#16 Short offline Completed: read failure 9...
#17 Short offline Completed: read failure 9...
#18 Extended offline Completed: read failure 9...
#19 Short offline Completed: read failure 9...
#20 Short offline Completed: read failure 9...
#21 Short offline Completed: read failure 9...
20 of 20 failed self-tests are outdated by newer success...
guard#
うまく、いったっぽい!( ´▽`)ノ
ページ名: