SOLVED Degraded pool, now what ?

vmoriaux

Dabbler
Joined
Dec 12, 2023
Messages
10
I recently got this alert:
"Pool SSDPool state is ONLINE: One or more devices has experienced an error resulting in data corruption. Applications may be affected."

I found the culprit directory, I can't delete it, but I could rename and move it so that it's not causing any major issue. Yet my cloud replication fails because of it.

I really wish the TrueNas doc and tutorial covered this type of stressful situation.

My system is very simple. Too simple for some of you, but I'm fine with it :smile:
  • TrueNAS-SCALE-22.12.4.2
  • Boot pool is on a single NVME drive
  • My HDDPool is on a single 4TB spinning drive
  • The SSDPool is on single 0.5TB SSD drive to host my application (containers) config and data
  • A backup pool is on single USB attached drive
I have daily snapshots of my dataset + replication of them to the USB drive. And I also rsync (cloudsync) the data to my Azure storage. I also keep a backup of the data on another USB drive by copying the data from the SMB shares to the drive using my desktop machine.

Code:
  pool: HDDPool
 state: ONLINE
  scan: scrub repaired 0B in 05:27:43 with 0 errors on Sat Dec  9 06:27:45 2023
config:

        NAME                                    STATE     READ WRITE CKSUM
        HDDPool                                 ONLINE       0     0     0
          be70b993-b12a-4d32-abc1-8a44b9ba0428  ONLINE       0     0     0

errors: No known data errors

  pool: SSDPool
 state: ONLINE
status: One or more devices has experienced an error resulting in data
        corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
        entire pool from backup.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-8A
  scan: scrub repaired 0B in 00:05:05 with 0 errors on Sat Dec  9 00:05:06 2023
config:

        NAME                                    STATE     READ WRITE CKSUM
        SSDPool                                 ONLINE       0     0     0
          ddaa4e35-c9f3-4d3b-ad89-ef169445ee8d  ONLINE       0     0    48

errors: Permanent errors have been detected in the following files:

        /mnt/SSDPool/applications/corrupted_dir

  pool: UsbBackupPool
 state: ONLINE
  scan: scrub repaired 0B in 03:56:37 with 0 errors on Sat Dec  9 05:56:41 2023
config:

        NAME                                    STATE     READ WRITE CKSUM
        UsbBackupPool                           ONLINE       0     0     0
          b5f182aa-1461-4f48-b2d2-3262cef754a2  ONLINE       0     0     0

errors: No known data errors

  pool: boot-pool
 state: ONLINE
status: Some supported and requested features are not enabled on the pool.
        The pool can still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(7) for details.
  scan: scrub repaired 0B in 00:00:05 with 0 errors on Tue Dec 12 03:45:07 2023
config:

        NAME         STATE     READ WRITE CKSUM
        boot-pool    ONLINE       0     0     0
          nvme0n1p3  ONLINE       0     0     0

errors: No known data errors


Code:
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.15.131+truenas] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Desktop HDD.15
Device Model:     ST4000DM000-1F2168
Serial Number:    Z304YFMF
LU WWN Device Id: 5 000c50 086ed586f
Firmware Version: CC54
User Capacity:    4,000,787,030,016 bytes [4.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5900 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Tue Dec 12 11:18:57 2023 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:                (  107) 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:        ( 502) minutes.
Conveyance self-test routine
recommended polling time:        (   2) minutes.
SCT capabilities:              (0x1085) SCT Status 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   118   099   006    Pre-fail  Always       -       173331360
  3 Spin_Up_Time            0x0003   100   091   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   097   097   020    Old_age   Always       -       3627
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   082   060   030    Pre-fail  Always       -       170681065
  9 Power_On_Hours          0x0032   046   046   000    Old_age   Always       -       47448
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   099   099   020    Old_age   Always       -       2013
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0 0 0
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   066   059   045    Old_age   Always       -       34 (Min/Max 30/39)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       0
193 Load_Cycle_Count        0x0032   001   001   000    Old_age   Always       -       424654
194 Temperature_Celsius     0x0022   034   041   000    Old_age   Always       -       34 (0 11 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
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       22008h+44m+18.914s
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       86835629362
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       1746342310339

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%     47389         -
# 2  Short offline       Completed without error       00%     47293         -
# 3  Short offline       Completed without error       00%     47221         -
# 4  Extended offline    Completed without error       00%     47183         -
# 5  Short offline       Completed without error       00%     47125         -
# 6  Short offline       Completed without error       00%     47053         -
# 7  Short offline       Completed without error       00%     46957         -
# 8  Short offline       Completed without error       00%     46885         -
# 9  Short offline       Completed without error       00%     46789         -
#10  Short offline       Completed without error       00%     46717         -
#11  Short offline       Completed without error       00%     46621         -
#12  Short offline       Completed without error       00%     46549         -
#13  Extended offline    Completed without error       00%     46463         -
#14  Short offline       Completed without error       00%     46453         -
#15  Short offline       Completed without error       00%     46380         -
#16  Short offline       Completed without error       00%     46284         -
#17  Short offline       Completed without error       00%     46212         -
#18  Short offline       Completed without error       00%     46116         -
#19  Short offline       Completed without error       00%     46044         -
#20  Short offline       Completed without error       00%     45948         -
#21  Short offline       Completed without error       00%     45876         -

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 SSD seems to be healthy so far, don't you agree? What are my options? Do I delete only the one dataset and restore it from my USB drive? Or do I need to kill the pool completely and restore all the datasets to it? Can I trust the latest dataset snapshot that have been replicated since they contain this "corrupted_dir" folder? Will I need to redeploy all my applications (they all use host path)?

Thanks for your help.
 
Last edited by a moderator:

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
The SSD seems to be healthy so far, don't you agree?
Not at all. It returned a bunch of bad data to ZFS.
Do I delete only the one dataset and restore it from my USB drive?
Yes, but expect the SSD to keep failing.
Can I trust the latest dataset snapshot that have been replicated since they contain this "corrupted_dir" folder?
Simple answer is no, though the details are interesting. What does zfs send do if it encounters corrupt data? In any case, older snapshots on the recv side should be okay.

Also: Please use CODE tags in the future when pasting console output, in order to preserve whitespace and thus readability.
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
I recently got this alert:
"Pool SSDPool state is ONLINE: One or more devices has experienced an error resulting in data corruption. Applications may be affected."

I found the culprit directory, I can't delete it, but I could rename and move it so that it's not causing any major issue. Yet my cloud replication fails because of it.
Since you have only a single drive on the pool and that data has been somehow corrupted ZFS can't do anything about it: you have to either delete it or restore from backup. I also suggest a scrub to see if it's an isolated case or a clue of something bigger going on.

The SSD seems to be healthy so far, don't you agree?
Well, you have posted the smartctl -a of the HDD so I can't agree :grin:
How is the SSD connected to the motherboard? You are getting checksum errors so please reseat power and data cables (if existing) and look for damage on them.
 

vmoriaux

Dabbler
Joined
Dec 12, 2023
Messages
10
Thanks, Where in the smartctl result do you see the issue? It seems I missed an important information.
All the short (twice a week) and extended (1st of the month) smart tests are successful in the UI.

It is true that the UI reports 48 checksum errors for this VDEV though. And yes I'm a complete ZFS noob.

The drive is scrubbed every Sunday and didn't report any error so far. I'm forcing a scrub right now.

Then I'll verify my cables and test again.
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
Code:
    pool: SSDPool
 state: ONLINE
status: One or more devices has experienced an error resulting in data
        corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
        entire pool from backup.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-8A
  scan: scrub repaired 0B in 00:05:05 with 0 errors on Sat Dec  9 00:05:06 2023
config:

        NAME                                    STATE     READ WRITE CKSUM
        SSDPool                                 ONLINE       0     0     0
          ddaa4e35-c9f3-4d3b-ad89-ef169445ee8d  ONLINE       0     0    48

errors: Permanent errors have been detected in the following files:

        /mnt/SSDPool/applications/corrupted_dir


It's not in the smartct section because you did not post the smartctl section of the SSD.
 

vmoriaux

Dabbler
Joined
Dec 12, 2023
Messages
10
Code:
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.15.131+truenas] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     SAMSUNG SSD SM871 2.5 7mm 512GB
Serial Number:    S2D4NYAG905987
LU WWN Device Id: 5 002538 d0004edd0
Firmware Version: EMM02D0Q
User Capacity:    512,110,190,592 bytes [512 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4c
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Tue Dec 12 15:36:00 2023 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:  (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:        ( 265) 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   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   090   090   000    Old_age   Always       -       47556
 12 Power_Cycle_Count       0x0033   097   097   000    Pre-fail  Always       -       2041
175 Program_Fail_Count_Chip 0x0033   100   100   010    Pre-fail  Always       -       0
176 Erase_Fail_Count_Chip   0x0033   100   100   010    Pre-fail  Always       -       0
177 Wear_Leveling_Count     0x0013   069   069   005    Pre-fail  Always       -       657
178 Used_Rsvd_Blk_Cnt_Chip  0x0013   100   100   010    Pre-fail  Always       -       0
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010    Pre-fail  Always       -       0
180 Unused_Rsvd_Blk_Cnt_Tot 0x0013   100   100   010    Pre-fail  Always       -       2514
181 Program_Fail_Cnt_Total  0x0033   100   100   010    Pre-fail  Always       -       0
182 Erase_Fail_Count_Total  0x0033   100   100   010    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0033   100   100   000    Pre-fail  Always       -       0
195 Hardware_ECC_Recovered  0x001b   200   200   000    Pre-fail  Always       -       0
241 Total_LBAs_Written      0x0033   099   099   000    Pre-fail  Always       -       281905908134
242 Total_LBAs_Read         0x0033   099   099   000    Pre-fail  Always       -       223723808212

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%     47492         -
# 2  Short offline       Completed without error       00%     47396         -
# 3  Short offline       Completed without error       00%     47324         -
# 4  Extended offline    Completed without error       00%     47279         -
# 5  Short offline       Completed without error       00%     47228         -
# 6  Short offline       Completed without error       00%     47156         -
# 7  Short offline       Completed without error       00%     47060         -
# 8  Short offline       Completed without error       00%     46988         -
# 9  Short offline       Completed without error       00%     46892         -
#10  Short offline       Completed without error       00%     46820         -
#11  Short offline       Completed without error       00%     46724         -
#12  Short offline       Completed without error       00%     46652         -
#13  Extended offline    Completed without error       00%     46559         -
#14  Short offline       Completed without error       00%     46556         -
#15  Short offline       Completed without error       00%     46483         -
#16  Short offline       Completed without error       00%     46387         -
#17  Short offline       Completed without error       00%     46315         -
#18  Short offline       Completed without error       00%     46147         -
#19  Short offline       Completed without error       00%     46051         -
#20  Short offline       Completed without error       00%     45979         -
#21  Extended offline    Completed without error       00%     45816         -

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

vmoriaux

Dabbler
Joined
Dec 12, 2023
Messages
10
Code:
ZFS has finished a scrub:

eid: 74
class: scrub_finish
host: truenas
time: 2023-12-12 15:12:00+0100
pool: SSDPool
state: ONLINE
status: One or more devices has experienced an error resulting in data
corruption. Applications may be affected.
action: Restore the file in question if possible. Otherwise restore the
entire pool from backup.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-8A
scan: scrub repaired 0B in 00:05:29 with 0 errors on Tue Dec 12 15:12:00 2023
config:

NAME STATE READ WRITE CKSUM
SSDPool ONLINE 0 0 0
ddaa4e35-c9f3-4d3b-ad89-ef169445ee8d ONLINE 0 0 48

errors: 1 data errors, use '-v' for a list
 
Top