自動ディスクの問題:dmesgレポートの理解とリスク評価

自動ディスクの問題:dmesgレポートの理解とリスク評価

10ノードCassandraクラスタがあり、4つのノードにいくつかの報告されたディスクエラーが表示されますdmesg。これらのレポートはほぼ毎時間表示されます。

エラーが報告されたディスクは8TB論理ボリュームの半分です。他のディスクはエラーを報告していないようです。

[Wed Sep 28 12:29:02 2022] sas: Enter sas_scsi_recover_host busy: 1 failed: 1
[Wed Sep 28 12:29:02 2022] sas: ata7: end_device-0:0: cmd error handler
[Wed Sep 28 12:29:02 2022] sas: ata7: end_device-0:0: dev error handler
[Wed Sep 28 12:29:02 2022] ata7.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[Wed Sep 28 12:29:02 2022] sas: ata8: end_device-0:1: dev error handler
[Wed Sep 28 12:29:02 2022] ata7.00: failed command: READ DMA EXT
[Wed Sep 28 12:29:02 2022] ata7.00: cmd 25/00:08:10:d8:5d/00:00:84:01:00/e0 tag 8 dma 4096 in
         res 51/40:00:10:d8:5d/00:00:84:01:00/e0 Emask 0x9 (media error)
[Wed Sep 28 12:29:02 2022] ata7.00: status: { DRDY ERR }
[Wed Sep 28 12:29:02 2022] ata7.00: error: { UNC }
[Wed Sep 28 12:29:02 2022] ata7.00: supports DRM functions and may not be fully accessible
[Wed Sep 28 12:29:02 2022] ata7.00: supports DRM functions and may not be fully accessible
[Wed Sep 28 12:29:02 2022] ata7.00: configured for UDMA/133
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] Sense Key : Medium Error [current] [descriptor]
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] CDB: Read(16) 88 00 00 00 00 01 84 5d d8 10 00 00 00 08 00 00
[Wed Sep 28 12:29:02 2022] blk_update_request: I/O error, dev sda, sector 6515709968
[Wed Sep 28 12:29:02 2022] ata7: EH complete
[Wed Sep 28 12:29:02 2022] sas: --- Exit sas_scsi_recover_host: busy: 0 failed: 1 tries: 1
[Wed Sep 28 12:29:02 2022] ata7.00: Enabling discard_zeroes_data

iostat -xdct 1 100R / W速度と平均キューサイズについて非常に合理的な数値を示します。

grep "^sda" iostat-xdct | awk '{n+=1; r+=$6; w+=$7; qsz+=$9; qmx=qmx<$9?$9:qmx; qmi=qmi>$9?$9:qmi}END{printf("%.3f\t%.3f\t%.3f\t\t[%.3f , %.3f]\n",r/n,w/n,qsz/n,qmi,qmx)}'

818.239 6.939   0.038           [0.000 , 0.890]

私たちのすべての一般的な指標によると、システムはうまく機能しています。しかし、これは予期しない瞬間に致命的なシステムエラーを引き起こす可能性があるという懸念があります。

報告されたエラーが何を意味するのかわかりません。私はこのようにシステムを実行し続けることに関連するリスクを評価する方法がわかりません。ディスクをすぐに交換する必要がありますか?

smartctl -a /dev/sdaの出力をここに貼り付けます。

smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-693.21.1.el7.x86_64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     Samsung SSD 870 EVO 4TB
Serial Number:    S6BBNJ0R700321V
LU WWN Device Id: 5 002538 f31706f50
Firmware Version: SVT01B6Q
User Capacity:    4,000,787,030,016 bytes [4.00 TB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   Unknown(0x09fc), ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA >3.2 (0x1ff), 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Wed Sep 28 12:58:46 2022 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                    was never started.
                    Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                    without error or no self-test has ever
                    been run.
Total time to complete Offline
data collection:        (    0) seconds.
Offline data collection
capabilities:            (0x53) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    No Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                    General Purpose Logging supported.
Short self-test routine
recommended polling time:    (   2) minutes.
Extended self-test routine
recommended polling time:    ( 320) minutes.
SCT capabilities:          (0x003d) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   068   068   010    Pre-fail  Always       -       1510
  9 Power_On_Hours          0x0032   098   098   000    Old_age   Always       -       9429
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       6
177 Wear_Leveling_Count     0x0013   099   099   000    Pre-fail  Always       -       11
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   068   068   010    Pre-fail  Always       -       1510
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always       -       0
183 Runtime_Bad_Block       0x0013   068   068   010    Pre-fail  Always       -       1510
187 Reported_Uncorrect      0x0032   099   099   000    Old_age   Always       -       8242
190 Airflow_Temperature_Cel 0x0032   068   056   000    Old_age   Always       -       32
195 Hardware_ECC_Recovered  0x001a   199   199   000    Old_age   Always       -       8242
199 UDMA_CRC_Error_Count    0x003e   100   100   000    Old_age   Always       -       0
235 Unknown_Attribute       0x0012   099   099   000    Old_age   Always       -       4
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       35415578583

SMART Error Log Version: 1
ATA Error Count: 8242 (device log contains only the most recent five errors)
    CR = Command Register [HEX]
    FR = Features Register [HEX]
    SC = Sector Count Register [HEX]
    SN = Sector Number Register [HEX]
    CL = Cylinder Low Register [HEX]
    CH = Cylinder High Register [HEX]
    DH = Device/Head Register [HEX]
    DC = Device Command Register [HEX]
    ER = Error register [HEX]
    ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 8242 occurred at disk power-on lifetime: 9429 hours (392 days + 21 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 08 10 d8 5d e0  Error:

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------

Error 8241 occurred at disk power-on lifetime: 9428 hours (392 days + 20 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 08 e8 d7 5d e0  Error:

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------

Error 8240 occurred at disk power-on lifetime: 9427 hours (392 days + 19 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 08 e8 d7 5d e0  Error:

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------

Error 8239 occurred at disk power-on lifetime: 9427 hours (392 days + 19 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 08 e8 d7 5d e0  Error:

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------

Error 8238 occurred at disk power-on lifetime: 9426 hours (392 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 08 e8 d7 5d e0  Error:

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
  256        0    65535  Read_scanning was never started
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

ベストアンサー1

これは非常に悪いディスクです。ねえ:

[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] Sense Key : Medium Error [current] [descriptor]
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] CDB: Read(16) 88 00 00 00 00 01 84 5d d8 10 00 00 00 08 00 00
[Wed Sep 28 12:29:02 2022] blk_update_request: I/O error, dev sda, sector 6515709968

これは、オペレーティングシステムがディスクからデータを読み取ることができないことを示します。

ねえ:

SMART Attributes Data Structure revision number: 1

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   068   068   010    Pre-fail  Always       -       1510
  9 Power_On_Hours          0x0032   098   098   000    Old_age   Always       -       9429
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       6

ディスクは約13ヶ月間実行されました(24×7の仮定、6回の電源サイクルのみ記録されるのが合理的です)。残念ながら、再割り当てされた1510セクターは、私が満足するよりも約1505セクターです。

ここでは、失敗したディスクの読み取りがたくさんあることがわかります。

183 Runtime_Bad_Block       0x0013   068   068   010    Pre-fail  Always       -       1510
187 Reported_Uncorrect      0x0032   099   099   000    Old_age   Always       -       8242

195 Hardware_ECC_Recovered  0x001a   199   199   000    Old_age   Always       -       8242

かなりの数のブロック(おそらく131TB)を作成しましたが、特別なものはありません(SSDは寿命の間に高い書き込み期待を保証し、あなたのブロックは2400TBです)。確かに不均衡ではありません。

241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       35415578583

オペレーティングシステムがディスクに512Bセクタを持っていると認識するのが少し心配です。セクタ/ブロックは4kBでなければなりません。これが本当かどうかを確認するには、fdiskまたは同じツールを使用して確認する価値があります。partedsmartctl

結局、今は新しいディスクを購入する必要がある時だと言いたいと思います。 13ヶ月が経過すると期限切れになることを考えると、12ヶ月の保証があると思いましたが、EVOは5年のようです。


OPはコメントで次のように尋ねました。これらの再配置は、ハードウェアの問題(登録されていないセクタなど)にもかかわらず、ディスクが機能し続ける方法ですか?なぜiostatまだすべてが正常であるとマークされていますか?」。

ディスクセクタ/ブロックを読み取れない場合は、オペレーティングシステムレベルでエラーが発生します。ファイルを読み取ろうとすると(編集、コピー、バックアップ)、IOエラーが発生することがよくあります。ディスクはセクタ/ブロックを読み取れないとマークし、変更できない数が増えます。オペレーティングシステム(またはアプリケーション)がディスク上の対応するセクタ/ブロックにデータを書き込むと、ファームウェアはそのセクタ/ブロックをこの目的のために予約されているスペアセクタ/ブロックの1つに再マッピングする機会があります。変更できない数は減らすことができますが、再割り当てされた数は増えます。

これまで、ディスクファームウェアは1510個のセクタ/ブロックを正常に再割り当てしており、ほとんどのIOは良好です(これがまともにiostat見える理由です)。時には、図に示すように、読み取れない別のセクタ/ブロックに出会いdmesg、書き込みを試みない限り、この問題は消えません。遅かれ早かれ、ディスクは予約されたセクタ/ブロックを使い果たし、一連の書き込みエラーの後にファイルシステムが破損する可能性があります。これは実際には必要な場所ではないため、保証対象のディスクと交換してみることをお勧めします。

にもかかわらず、良いバックアップがあることを確認し、引き続き保管してください。

おすすめ記事