ZFS read/write errors during scrub

Hello everyone

My first post here, so i hope it looks good enough and all the needed info is here.

Its my first time trying TrueNAS, and therefore dont have all the knowledge i probably should have either :stuck_out_tongue:

I have built a system, been lucky to get most very cheap or free, thats why the “huge” system.

I have just bought 6 brand new Seagate-drives, and im having issues with at least 3 of them consistently.

The problem im having at the moment, is with what seems to be defective drives, because i keep getting ZFS read/write-errors on the drives during scrub-task, and this puts the drives in a “FAULTED” state.

  • All drives have PASSED short and LONG SMART-test, with no errors.
  • All drives is “Good” according to Seagate’s own “SeaTools”.
  • I have moved drives to different slots in cabinet, utilizing a different HBA (see system info). Error follows drives to new slot when running new scrub-task.
  • I have tried to upgrade firmware on drives to newest SN04.
  • I formatted drives in Windows, to force a resilver of the drive after firmware upgrade, still getting the ZFS read/write errors.

There is no issues copying data to the pool, i have only seen the error during scrub-task.

Question 1:
Is there any commands or so to “force” reset of a drive in regards to the read/write errors? Like, since you can swap drives around because its the ID of the drive being the identifier, does TrueNAS somehow “remember” that this drive was giving errors?

Question 2
I have noticed that it seems my drives get a new /dev/sd* letter on host reboot, is this normal, or is it a issue?

All 6 drives basically have the same test-results as shown below, so only posting two atm.

System info

OS: TrueNAS Scale 24.10.1

System
SuperMicro X10DRI-T4+
2x Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz
256GB ECC RAM

HBA IT-mode
1x LSI 9300-16i
1x HP220/LSI 9205-8i

Cabinet:
InterTech 4U-4424
6 rows of 4-wide drive-slots
Each row has its own SAS/SATA backplane, one SAS-cable to each row from the HBA’s.

Pool info

Pools:

Boot
2x 480GB HPE MK000480GWUGF SSD-drives in MIRROR

Storage:
“SSD_Pool”
6x 960GB HPE-branded MK000960GWSSD

“BygdePool”
18x 14TBdrives, 3 VDEV’s of RAIDZ2

12 drives HPE-branded MB014000GWUDA
6 drives Seagate ST14000NM001G

SMART info

SMART-info /dev/sda

root@truenas[/home/truenas_admin]# smartctl -a /dev/sda
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.44-production+truenas] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Exos X16
Device Model:     ST14000NM001G-2KJ103
Serial Number:    ZL2B769T
LU WWN Device Id: 5 000c50 0c81ccd58
Firmware Version: SN04
User Capacity:    14,000,519,643,136 bytes [14.0 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database 7.3/5625
ATA Version is:   ACS-4 (minor revision not indicated)
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Tue Jan 14 16:55:30 2025 CET
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:                (  567) 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:        (1242) 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   081   065   044    Pre-fail  Always       -       134535817
  3 Spin_Up_Time            0x0003   093   093   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       14
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   072   060   045    Pre-fail  Always       -       16764616
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       291
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       13
 18 Head_Health             0x000b   100   100   050    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   073   068   040    Old_age   Always       -       27 (Min/Max 27/29)
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       6
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       560
194 Temperature_Celsius     0x0022   027   040   000    Old_age   Always       -       27 (0 21 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 Pressure_Limit          0x0023   100   100   001    Pre-fail  Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       63h+52m+22.824s
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       4654908096
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       4767249956

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  Extended offline    Completed without error       00%        44         -
# 2  Extended offline    Interrupted (host reset)      00%         2         -

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.

The above only provides legacy SMART information - try 'smartctl -x' for more

SMART-info /dev/sde

root@truenas[/home/truenas_admin]# smartctl -a /dev/sde
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.44-production+truenas] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Exos X16
Device Model:     ST14000NM001G-2KJ103
Serial Number:    ZLW1GZ28
LU WWN Device Id: 5 000c50 0c64f034f
Firmware Version: SN04
User Capacity:    14,000,519,643,136 bytes [14.0 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database 7.3/5625
ATA Version is:   ACS-4 (minor revision not indicated)
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Tue Jan 14 16:57:19 2025 CET
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:                (  567) 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:        (1285) 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   081   064   044    Pre-fail  Always       -       133653505
  3 Spin_Up_Time            0x0003   092   092   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       20
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   074   060   045    Pre-fail  Always       -       27844817
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       292
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       17
 18 Head_Health             0x000b   100   100   050    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   070   064   040    Old_age   Always       -       30 (Min/Max 29/32)
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       9
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       510
194 Temperature_Celsius     0x0022   030   040   000    Old_age   Always       -       30 (0 22 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 Pressure_Limit          0x0023   100   100   001    Pre-fail  Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       84h+45m+15.183s
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       13151632442
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       411820984

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  Extended offline    Completed without error       00%       254         -
# 2  Extended offline    Completed without error       00%        21         -

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.

The above only provides legacy SMART information - try 'smartctl -x' for more

Hopefully all needed info is here, will fill in the blanks as needed.
I have the feeling that the drives are the problem, but i also have a feeling that im not gonna get it on warranty since SeaTools says its all good, but will see.
Thanks for any replies :slight_smile:

Can you give us the output of zpool status -v

You can try marking offline the disk in ZFS, uninstall the disk from system/reboot/shutdown/reinstall/boot up/add disk back.

This is odd, you have the same exact drives as I do and I did have one fail, but the SMART long test was failing. SN04 was smart, since there are issues with SN03. The only other thing I might try is plugging one of the errored drives into the motherboard SATA controller and not on the HBA. Maybe there is some sort of operability issue? (Grasping at straws, I know.)

Yeah, it is annoying, but not within TrueNAS’s control. This is why ZFS uses the serial number to keep track and also why you have to pass controllers through when virtualizing as the drive letters can randomly change.

You will likely not get an RMA for the drives until you can show SMART errors. I use Steve Gibson’s excellent spinrite 6.1 and when my drive had some issues I ran spinrite on it and it found 469 bad sectors, which SMART reported and I was able to RMA my drive.

1 Like

If you want to remove the errors you can use: zpool clear poolname
This does not fix the underlying problem, it just zeroes the error counters for read, write and checksum.

I would wait with doing that until people here have had a chance to see what it looks like.

Knew i forgot something…

zpool status
root@truenas[/home/truenas_admin]# zpool status -v
  pool: BygdePool
 state: ONLINE
status: One or more devices are faulted in response to persistent errors.
        Sufficient replicas exist for the pool to continue functioning in a
        degraded state.
action: Replace the faulted device, or use 'zpool clear' to mark the device
        repaired.
  scan: scrub repaired 0B in 02:44:27 with 0 errors on Tue Jan 14 15:17:54 2025
config:

        NAME                                      STATE     READ WRITE CKSUM
        BygdePool                                 ONLINE       0     0     0
          raidz2-0                                ONLINE       0     0     0
            370e84b1-72e1-49d8-9f9d-8d283615cb59  ONLINE       0     0     0
            e1dc57f4-a04f-4a30-a382-e33fcd84da79  FAULTED    531   620     0  too many errors
            822de63f-b1a0-4a6f-aec7-e2df9f07285d  ONLINE       0     0     0
            8fa24a2c-d4a7-4a94-bfe5-6a662b6b0dec  ONLINE       0     0     0
            e72da7d8-6f1d-4a82-abdb-8a07dcef7bac  ONLINE       0     0     0
            abadb5f8-6d07-43a2-87d3-bdb7adb123c2  ONLINE       0     0     0
          raidz2-1                                ONLINE       0     0     0
            5d82ba69-81cb-450b-acef-4375a8d622b1  ONLINE       0     0     0
            56588b36-f44b-4a2b-ad99-a5cdeb5aa48a  ONLINE       0     0     0
            fb716d30-8b8b-4dfc-8c3d-4b4a3d1249ca  FAULTED    531   626     0  too many errors
            c79d2731-7b4a-4cc0-8897-3b3252275d6b  ONLINE       0     0     0
            80996b44-b68b-49b7-86a7-3060ea3fcba3  ONLINE       0     0     0
            c2b2ce86-2d5e-4aff-bc72-bc510facd046  ONLINE       0     0     0
          raidz2-2                                ONLINE       0     0     0
            f75bcb7a-fecb-48b4-bac6-1d82379a2cf2  ONLINE       0     0     0
            86d4edb0-fa3b-4f54-9746-d5b3a3dc7aae  ONLINE       0     0     0
            4f15c61c-b8b7-4f2e-ae98-bc95d39113f1  ONLINE       0     0     0
            ce347844-d1bb-4cc9-a228-3a91e579391e  ONLINE       0     0     0
            cdb21c6c-92d9-4305-9c00-7de03270b182  ONLINE       0     0     0
            a12e4bab-e001-4efe-85a5-9a1bdf7e69c8  ONLINE       0     0     0

errors: No known data errors

  pool: SSD_Pool
 state: ONLINE
  scan: scrub repaired 0B in 00:00:00 with 0 errors on Sun Jan 12 00:00:01 2025
config:

        NAME                                      STATE     READ WRITE CKSUM
        SSD_Pool                                  ONLINE       0     0     0
          raidz2-0                                ONLINE       0     0     0
            7280e36f-aa4c-41e3-a241-df2afa6e7ede  ONLINE       0     0     0
            c61082e3-40f4-46b9-81d4-f4c3158da532  ONLINE       0     0     0
            61a92d24-fd7a-4c6b-9740-b0168b14eac0  ONLINE       0     0     0
            0a602c7d-b369-4d30-a72b-c59f03d040e6  ONLINE       0     0     0
            7e4e38a8-dfbc-4aa0-a362-8f8d78d5faaf  ONLINE       0     0     0
            c48834c4-2b07-454c-b56f-99abafaffa87  ONLINE       0     0     0

errors: No known data errors

  pool: boot-pool
 state: ONLINE
  scan: scrub repaired 0B in 00:00:10 with 0 errors on Tue Jan 14 03:45:12 2025
config:

        NAME        STATE     READ WRITE CKSUM
        boot-pool   ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            sdg3    ONLINE       0     0     0
            sdi3    ONLINE       0     0     0

Also forgot to mention in system that pools are using encryption, no idea if it has anything to do with anything tough :stuck_out_tongue:

So if i understood the suggestion, is should maybe remove the drives, so that the pool is in an degraded state, then reinstall TrueNAS, and import pool, resilver pool after?

weird that the error count is the same on two different drives. I guess I would just clear the errors for right now and see what happens. I would have SMART long tests running every few days to make sure errors do not reappear.

I have tried this, bad explanation from me previosly.
I can consistently recreate the errors, by running “zpool clear” on the pool, then run a scrub task again.
All drives are green and good after a zpool clear, and as soon as i start the scrub, like a minute or two in, the errors occur and drives are faulted.

And as mentioned, it is a bit weird, but yes, all the drives in question report almost same amount of read/write errors.

There are people here that are much better at this than me. If I were fighting this, I would offline one of the “failed” drives, get spinrite, pull the drive and run a level 2 test on and see if it finds any errors, if it does, it will log to SMART, if it doesn’t, I would format the drive and reinstall/resilver it and see what happens. I know this is kind of blunt force, but I dont have any other good ideas.

Thanks so far anyway, will look into the software :slight_smile:

I recommend running badblocks to test how well the drives handle read and writing all sectors. I’d trust that more than the (in my opinion) bombastic Spinrite when trying to weed out drives failing according to the bathtub curve.

Just keep in mind that badblocks is typically destructive to any current data on the drive.

Bombastic? :rofl: I have never heard that term before with a piece of software. Spinrite has done a good job for me and I had a similar issue where SMART was passing but ZFS was reporting issue, Spinrite identified 470ish bad sectors and suddenly SMART knew about them. badblocks works as well and it can be run non-destrucitve (I am unclear if it is as effective). Both approaches work, I like spinrite because I have a crappy old PC sitting around that I can plug the drive into and boot from USB without impacting my running environment.

How would i proceed to run that test?
And is it per disk, or do i need toi wipe the pool?

If you run badblocks and want to run it destructive, I would offline it and run it against the offlined drive. Ideally you can pull the drive and run badblocks on it from a different system. I would do one drive at a time. If it completes without issue, reinstall it and see what happens, if it errors out, it will hopefully have come to SMARTs attention that there is an issue, then you can RMA.

I conseed I am probably adversely affected by the way Mr. Gibson presents things, they are often dramatic, flashy and colourful in a way I find very unappealing. That kind of attention seeking is something I usually equate with scammy behaviour.

2 Likes

Good morning
Just an update and a question here:

The badblocks scan is running along on 3 of my drives, and still no errors found on any drive.
Is it “normal” that it might not show any errors until the end?

The command i ran on drives is:
badblock -b 4096 -ws /dev/sd*

Its done with the “0xaa” and “0x55”, and 60% writing the third “0xff” pattern, still with no errors. Will of course let the test complete, but kind of would have been nice to see errors by now since its done 2 full passes already.

Next step if no errors are found will be to put the drives on SATA directly to motherboard and see what happens. Maybe my drives dont like the backplane for some unlikely reason

If the drives are healthy, it is normal that badblocks does not report errors.

Well, the badblocks-scan is now finished, and a new long smart-test have been run. No errors reported…

Can someone explain what goes on during a scrub?

I havent been able to test with the disks directly on sata-ports on MB yet, but just trying to get some plans ahead of what to test next in case error still follows to sata-ports (will test next week).

Since i have tested different HBA-controllers, on different backplanes (same type, but different PCB as chassis have 6 times 4-slot ports/PCB/backplanes), could it be any other HW that causes the ZFS-errors during scrub? RAM? OS?

Since i have tested different HBA-controllers, on different backplanes (same type, but different PCB as chassis have 6 times 4-slot ports/PCB/backplanes), could it be any other HW that causes the ZFS-errors during scrub? RAM? OS?

RAM or other HW is likely the cause. It’s extremely unlikely that bad drives are the cause when you can consistently repeat the same number of errors across two different drives on different backplanes, etc.

All data is read, checksumed, and verified against the stored checksums.
You have ECC RAM, so any issue here should show up in logs.
The next suspect would be HBA overheating.

2 Likes

If the same drive fails - it could be cabling…
Switch the “faulty” drive with a “healthy” one.
Try scrub again…

Is this some logs i would need to find myself, and if so, where, or would it report stuff in the GUI/Alerts-section? I have seen no errors on HW in IPMI on MB, so not sure where to look as im new to TrueNAS…

I know the 16i-HBA gets hot, so i will try to get an extra fan mounted directly too it to see if that would solve anything, thanks.