CONTENTS


Lastmodified 2017-10-17 (火) 16:57:23


SMART error (CurrentPendingSector) detected on host

hotshot.smb.net daily security run output

Checking setuid files and devices:
find: /var/db/freebsd-update/files/3ff90a2ec342e48d0d2c2329e127dd132f057dbf10cd9ff4f533a751e9df1c13.gz: Input/output error
find: /var/db/freebsd-update/files/cbe452c53491e1c9f15af58e58c693932efd915d6f3449230dce5f24e71e72ba.gz: Input/output error


hotshot.smb.net kernel log messages:
+(ada0:ata2:0:0:0): READ_DMA48. ACB: 25 00 28 68 44 40 56 00 00 00 40 00
+(ada0:ata2:0:0:0): CAM status: ATA Status Error
+(ada0:ata2:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 40 (UNC )
+(ada0:ata2:0:0:0): RES: 51 40 48 68 44 56 56 00 00 1f 00
+(ada0:ata2:0:0:0): Retrying command
+(ada0:ata2:0:0:0): READ_DMA48. ACB: 25 00 a8 47 fc 40 2c 00 00 00 40 00

grep -i "smartd" /var/log/messages | tail

Jan  2 01:26:57 hotshot smartd[590]: Device: /dev/ada0, 1 Currently unreadable (pending) sectors
Jan  2 01:56:56 hotshot smartd[590]: Device: /dev/ada0, 1 Currently unreadable (pending) sectors
Jan  2 02:26:56 hotshot smartd[590]: Device: /dev/ada0, 4 Currently unreadable (pending) sectors (changed +3)
Jan  2 02:56:57 hotshot smartd[590]: Device: /dev/ada0, 4 Currently unreadable (pending) sectors
Jan  2 03:26:56 hotshot smartd[590]: Device: /dev/ada0, 16 Currently unreadable (pending) sectors (changed +12)
Jan  2 03:56:56 hotshot smartd[590]: Device: /dev/ada0, 17 Currently unreadable (pending) sectors (changed +1)
Jan  2 03:56:56 hotshot smartd[590]: Device: /dev/ada0, previous self-test completed with error (read test element)
Jan  2 03:56:56 hotshot smartd[590]: Device: /dev/ada0, Self-Test Log error count increased from 1 to 2
Jan  2 04:26:56 hotshot smartd[590]: Device: /dev/ada0, 17 Currently unreadable (pending) sectors
Jan  2 04:26:56 hotshot smartd[590]: Device: /dev/ada0, 1 Offline uncorrectable sectors

smartctl /dev/ada0 --log=selftest

smartctl 6.5 2016-05-07 r4318 [FreeBSD 10.3-RELEASE-p11 amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed: read failure       10%     42868         3899544120
# 2  Short offline       Completed without error       00%     42844         -
# 3  Extended offline    Completed: read failure       80%     42825         754739688
# 4  Short offline       Completed without error       00%     42819         -
# 5  Short offline       Completed without error       00%     42795         -
# 6  Short offline       Completed without error       00%     42771         -
# 7  Short offline       Completed without error       00%     42747         -
# 8  Short offline       Completed without error       00%     42723         -
# 9  Short offline       Completed without error       00%     42700         -
#10  Short offline       Completed without error       00%     42676         -
#11  Extended offline    Completed without error       00%     42662         -
#12  Short offline       Completed without error       00%     42652         -
#13  Short offline       Completed without error       00%     42628         -
#14  Short offline       Completed without error       00%     42604         -
#15  Short offline       Completed without error       00%     42580         -
#16  Short offline       Completed without error       00%     42556         -
#17  Short offline       Completed without error       00%     42532         -
#18  Short offline       Completed without error       00%     42508         -
#19  Extended offline    Completed without error       00%     42494         -
#20  Short offline       Completed without error       00%     42484         -
#21  Short offline       Completed without error       00%     42460         -

dumpfs /dev/ada0p2 | grep '^bsize'

bsize   32768   shift   15      mask    0xffff8000

Seek 位置の計算

      b = (int)((L-S)*512/B)
      where:
      b = File System block number
      B = File system block size in bytes (dumpfs 16384)
      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 = 3899544120を公式に代入。

b = (int)(3899544120 * 512 / 32768) = (int) 60930376.875 (小数点以下切捨)

sysctl kern.geom.debugflags=0x10

kern.geom.debugflags: 0 -> 16

dd if=/dev/zero of=/dev/ada0 bs=132768 count=1 seek=60930376

dd: /dev/ada0: Invalid argument
1+0 records in
0+0 records out
0 bytes transferred in 0.000292 secs (0 bytes/sec)

sysctl kern.geom.debugflags=0

kern.geom.debugflags: 16 -> 0

smartctl --test=long /dev/ada0

smartctl 6.5 2016-05-07 r4318 [FreeBSD 10.3-RELEASE-p11 amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 342 minutes for test to complete.
Test will complete after Mon Jan  2 10:59:46 2017

Use smartctl -X to abort test.

Total access 2190:本日 1:昨日 0

Counter: 2190, today: 1, yesterday: 0

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS