`zfs replace` keeps giving write errors with new drives & different SATA cables

Links to reddit and SU.

UPDATE Maybe it’s a firmware bug that the Seagate Exos X20 ST18000NM003D 18TB drive cannot use 512B sectors on ThinkStation S30 / Ubuntu 22.04 5.15.0-88-generic. I ended up destroying the pool and recreating it using 4K sectors and the errors have not returned.

I replaced a failing hard drive (increasing error counts in SMART, read/write/checksum errors in zpool status) in a ZFS raidz1 pool with a new one by running zfs offline and zfs replace. Resilvering started shortly, but keeps giving me write errors (please see below). When these resilvering processes eventually finished, the pool would remain in DEGRADED stated. If I zpool clear the errors or reboot, another resilvering process would start automatically, but giving a potentially different number of write errors.

SMART shows no error for this new drive. I also tried a different new drive (bought two replacements) and swapping SATA cables. It’s always this replacement drive giving the write errors during resilvering. This made me suspect that the ZFS pool is somehow compromised, but it continues to run and is able to zfs send every night.

What’s the right way to troubleshoot and resolve this issue (e.g., like zfs scrub a DEGRADED pool with just three of the four drives, since zfs replace cannot complete without errors)? I do have backups made by zfs send/receive which are hopefully good copies (does ZFS checksum received streams?).

  pool: space
 state: DEGRADED
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
  scan: resilver in progress since Fri Nov  3 09:56:59 2023
        2.92T scanned at 594M/s, 2.63T issued at 536M/s, 5.90T total
        669G resilvered, 44.59% done, 01:46:40 to go
config:

        NAME                                     STATE     READ WRITE CKSUM
        space                                    DEGRADED     0     0     0
          raidz1-0                               DEGRADED     0     0     0
            ata-ST3000DM001-1CH166_ZZZZ1111      ONLINE       0     0     0  block size: 512B configured, 4096B native
            ata-ST3000DM001-1CH166_ZZZZ2222      ONLINE       0     0     0  block size: 512B configured, 4096B native
            replacing-2                          UNAVAIL      0     0     0  insufficient replicas
              13284017409215481231               OFFLINE      0     0     0  was /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F12QMZ-part1
              ata-ST18000NM003D-3DL103_YYYY1111  FAULTED      0 4.38K     0  too many errors  (resilvering)
            ata-ST3000DM001-1CH166_ZZZZ4444      ONLINE       0     0     0  block size: 512B configured, 4096B native

EDIT: I’m seeing these errors in dmesg:

[19561.708059] sd 2:0:1:0: [sdb] tag#226 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=31s
[19561.708063] sd 2:0:1:0: [sdb] tag#226 Sense Key : Illegal Request [current]
[19561.708067] sd 2:0:1:0: [sdb] tag#226 Add. Sense: Unaligned write command
[19561.708070] sd 2:0:1:0: [sdb] tag#226 CDB: Write(16) 8a 00 00 00 00 00 68 f4 ff 40 00 00 00 53 00 00
[19561.708073] blk_update_request: I/O error, dev sdb, sector 1760886592 op 0x1:(WRITE) flags 0x700 phys_seg 83 prio class 0

EDIT: No errors from smartctl:

smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.15.0-88-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     ST18000NM003D-3DL103
Serial Number:    YYYY1111
LU WWN Device Id: 5 000c50 0e717e3c1
Firmware Version: SN03
User Capacity:    18,000,207,937,536 bytes [18.0 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-4 (minor revision not indicated)
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Sat Nov  4 10:04:47 2023 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:  (0x82) Offline data collection activity
                                        was completed without error.
                                        Auto Offline Data Collection: Enabled.
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:                (  575) seconds.
Offline data collection
capabilities:                    (0x7b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        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:        (   1) minutes.
Extended self-test routine
recommended polling time:        (1759) minutes.
Conveyance self-test routine
recommended polling time:        (   2) minutes.
SCT capabilities:              (0x70bd) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   083   064   044    Pre-fail  Always       -       179393245
  3 Spin_Up_Time            0x0003   094   094   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       6
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   075   061   045    Pre-fail  Always       -       33945298
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       71
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       6
 18 Unknown_Attribute       0x000b   100   100   050    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   098   000    Old_age   Always       -       30065229831
190 Airflow_Temperature_Cel 0x0022   062   047   000    Old_age   Always       -       38 (Min/Max 36/38)
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       3
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       6
194 Temperature_Celsius     0x0022   038   053   000    Old_age   Always       -       38 (0 23 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0023   100   100   001    Pre-fail  Always       -       0
240 Head_Flying_Hours       0x0000   100   100   000    Old_age   Offline      -       70 (122 77 0)
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       6940834183
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       35234995302

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%        63         -
# 2  Short offline       Completed without error       00%        40         -
# 3  Short offline       Completed without error       00%         0         -
# 4  Short offline       Interrupted (host reset)      00%         0         -
# 5  Short offline       Completed without error       00%         0         -

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
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.

Comments

Comments powered by Disqus