Hey All,
After scouring the forums for a dozen hours around this issue I thought it’d be better to simply make a new thread.
Due to current life circumstances, I got into Truenas with a “0 budget mentality”. I was only going to use spare parts that I had lying around the house.
This means that my current setup is:
- HP Elitedesk G1 Mini with a 500gb hdd (Boot-pool) and 16GB of ECC memory
- 2 USB connected 4TB WD RED disks (CMR) [and yes I am aware usb is not recommended and I have read Arwen’s usb thread and I am fine with living with those problems]
I have these two disks setup into 2 pools:
- wd_red_usb_data (referred as
data
from now on to save my fingers) - wd_red_usb_data_tooq (
data_tooq
)
data
has an SMB share that I use and data_tooq
is used as a backup pool.
I have hourly snapshots on both pools (expiry 2 weeks) and daily backups from data
→ data_tooq
. I also have weekly scrubs setup. I can’t setup smart tests on usb devices as it is not supported by Truenas but I can run them throught the terminal (unfortunately I didn’t do it when setting up the machine.)
A couple weeks ago I started getting error messages on Currently unreadable (pending) sectors
which I ignored
Last week I decided to get to the bottom of it and understood the following:
The disk used in data
is failing SMART tests:
data SMART results
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
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Red (CMR)
Device Model: WDC WD40EFRX-68WT0N0
Serial Number: WD-WCC4E3YKXJ1Z
LU WWN Device Id: 5 0014ee 2b60650de
Firmware Version: 82.00A82
User Capacity: 4,000,787,030,016 bytes [4.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Device is: In smartctl database 7.3/5625
ATA Version is: ACS-2 (minor revision not indicated)
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Tue Jan 14 02:36:21 2025 WET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART Status not supported: Incomplete response, ATA output registers missing
SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.
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: (52980) 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: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 530) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x703d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 1365
3 Spin_Up_Time 0x0027 182 174 021 Pre-fail Always - 7875
4 Start_Stop_Count 0x0032 082 082 000 Old_age Always - 18050
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 073 073 000 Old_age Always - 20429
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 096 096 000 Old_age Always - 4335
192 Power-Off_Retract_Count 0x0032 199 199 000 Old_age Always - 1449
193 Load_Cycle_Count 0x0032 188 188 000 Old_age Always - 36492
194 Temperature_Celsius 0x0022 114 090 000 Old_age Always - 38
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 13
198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0
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: read failure 90% 20309 1587379024
2 Short offline Completed without error 00% 8334 -
3 Short offline Completed without error 00% 0 -
4 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.
The above only provides legacy SMART information - try ‘smartctl -x’ for more
and zfs complains about corrupted data:
pool: wd_red_usb_data
state: DEGRADED
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://ope nzfs.gith ub.io/openzfs-docs/msg/ZFS-8000-8A
scan: scrub repaired 0B in 02:39:18 with 11 errors on Mon Jan 13 21:30:49 2025
config:
NAME STATE READ WRITE CKSUM
wd_red_usb_data DEGRADED 0 0 0
03368416-c6c1-4e26-ae3d-453734067684 DEGRADED 21 0 0 too many errors
errors: 12 data errors, use '-v' for a list
These 12 data errors are 12 different files that zfs complains are corrupted.
12 in the live filesystem, but if I run zpool status -v
it shows all the snapshots where the files have been saved (which is a lot with hourly snapshots.)
My question is:
Of the 12 files, 7 were added recently and 5 are older. Some of my older snapshots show only some of these files as corrupted.
e.g. snapshot from 2024-01-31_22-00 shows 4 corrupted files
but snapshot from 2025-01-01_23-00 shows 5 corrupted files
Now, from my understanding, since there were no changes to those files the snapshots won’t actually store any information so my data is lost on this disk correct?
For the older data it is not a problem as it should all be backed up in data_tooq
However, my new data, which apparently immediately landed on bad sectors (my bad for not having run a smart test beforehand) is now lost, is that also correct?
Note: I have run 2 scrubs on data
as a last resort but to no avail.
As next steps, I was considering the following:
- Smart test
data_tooq
’s drive andboot-pool
(ongoing) - Delete corrupted files from
data
- Replicate all data from
data
todata_tooq
(I was having trouble in the past with getting both pools data to match up… replication was “successful” but data size wouldn’t match up. And since this error (unreadable sectors
) popped up, replication was failing so I disabled it and need to restart.) - Get rid of the bad disk
- Run a memtest for good measure (I didn’t test the machine at all before setting up truenas)
- I would like to make
data_tooq
the main pool and add a share to its copy ofdata
while I try to find another 4TB drive somewhere - Add in the new drive and setup replication from
data_tooq
to it.
Is there any way to save my data that wasn’t backed up? Am I missing something from my next steps?
As a side note, assuming I do not want to move away from my elitedesk g1 mini and as such, move away from USB is there anything I can do to prevent situations like this? or is the daily replication as good as it gets?
Thanks a lot in advance!
P.S. I really did think this wouldn’t happen to me, guess you live and you learn some lessons thankfully this one was quite cheap!