ZFS expansion stuck in "paused" state after scrub task

Hello everyone, bit of a green horn to TrueNAS and I have a problem.

While I was expanding the pool, the system ran the automated scrub, and now the system is reporting a degraded state and the expansion is paused. After it finished the scrub, I switched off the automation. Help would be greatly appreciated.

  pool: Mother
 state: DEGRADED
status: One or more devices could not be used because the label is missing or
        invalid.  Sufficient replicas exist for the pool to continue
        functioning in a degraded state.
action: Replace the device using 'zpool replace'.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-4J
  scan: scrub repaired 0B in 15:06:33 with 0 errors on Sun Dec 15 15:07:30 2024
expand: expansion of raidz1-0 in progress since Tue Dec 10 02:00:24 2024
        15.5T / 24.3T copied at 32.5M/s, 63.70% done, paused for resilver or clear
config:

        NAME                                      STATE     READ WRITE CKSUM
        Mother                                    DEGRADED     0     0     0
          raidz1-0                                DEGRADED     0     0     0
            ed4c0028-a16b-4f12-9412-784ea35c2707  ONLINE       0     0     0
            9ad18062-9800-4b72-80d6-4601a309149a  ONLINE       0     0     0
            49d51ca4-bc4a-437a-9b6f-6f072160ab99  ONLINE       0     0     0
            bd6710a6-008a-4fa0-8d00-cf75b6019fee  ONLINE       0     0     0
            178861c9-da20-417f-b415-3b206ca8b1e1  UNAVAIL      0     0     0
        logs
          mirror-1                                ONLINE       0     0     0
            dbead5fa-880c-4316-a7e6-6b60508de098  ONLINE       0     0     0
            9fc44b1b-5bf1-455e-aec2-512656fa6133  ONLINE       0     0     0

errors: No known data errors

  pool: boot-pool
 state: ONLINE
  scan: scrub repaired 0B in 00:00:25 with 0 errors on Tue Dec 10 03:45:27 2024
config:

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

It says one of the drives is “unavailable”… is that the case?
Do you have a spare drive?

That one unavailable drive is the one that was being expanded, which is still in the system.

I was playing with the thought of rebooting the system, but don’t know if that will worsen the situation.

I’d suggest you look at the disk screen and then run a manual SMART test.

Is the disk good/bad is important…

I was unable to run the scan via the storage screen. I did however run a scan with shell.

=== START OF INFORMATION SECTION ===
Model Family:     Seagate BarraCuda 3.5 (SMR)
Device Model:     ST8000DM004-2U9188
Serial Number:    ZR15LZHG
LU WWN Device Id: 5 000c50 0e845ee80
Firmware Version: 0001
User Capacity:    8,001,563,222,016 bytes [8.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database 7.3/5625
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun Dec 15 23:21:58 2024 MST
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:                    (0x73) 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.
                                        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:        ( 988) minutes.
Conveyance self-test routine
recommended polling time:        (   2) minutes.
SCT capabilities:              (0x30a5) SCT Status 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   075   064   006    Pre-fail  Always       -       32917144
  3 Spin_Up_Time            0x0003   091   091   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   098   098   020    Old_age   Always       -       2295
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   090   060   045    Pre-fail  Always       -       1116070539
  9 Power_On_Hours          0x0032   093   093   000    Old_age   Always       -       6382h+44m+39.511s
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       23
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   062   046   040    Old_age   Always       -       38 (Min/Max 34/42)
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       -       196
193 Load_Cycle_Count        0x0032   099   099   000    Old_age   Always       -       2573
194 Temperature_Celsius     0x0022   038   054   000    Old_age   Always       -       38 (0 26 0 0 0)
195 Hardware_ECC_Recovered  0x001a   075   064   000    Old_age   Always       -       32917144
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      -       6049h+50m+39.888s
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       52383468965
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       124702495252

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%      6382         -

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.

And yeah… I now know SMR is bad after searching. I plan to switch them over to ironwolf over the next two months, including that 14(?)tb ultra star.

You seem to have hit the jackpot…
Scrub running just as RAID-Z expansion starts
SMR drive (is it brand new?

I’d recommend not putting the SMR drive in the pool… get a new drive and replace.

If you proceed, reboot and expand, you are in untested territory with SMR.

Let’s see if any greybeards have better advice…

(note: if the scrub caused a problem with RAID-Z expansion… that should be treated as a TrueNAS bug. The scrub tasks should be suspended first).

Did the pool become degraded immediately after scrub started???

That’s exactly what happened (well, a minute into the scrub), though the expansion has been running for a few days (the crux of SMR as I’ve sorely learned…)
image
The SMR drive in question is under a year old.

At this point, I’d be more interested in taking the drive out and count my blessings I’m still able to access everything. Do you believe a reboot is possible without loss of data, given the current state?

I suspect that if you remove a partially expanded disk you will still be degraded even though all disks look fine. Some records had blocks on the failed disk, so those records have 1 less redundant block but in theory you should still have enough blocks for a Scrub or resilver to fix things.

  1. So it MAY be possible to remove the drive and do a scrub and be back where you were before. But removing a drive is not supported, so personally I doubt this is the case. I think it is more likely that…

  2. ZFS now sees itself as permanently having the extra drive, even though expansion was never completed. Removing the drive will remove your redundancy and leave you with a permanent degraded RAIDZ until you can resilver with the new disk to regain redundancy. I would imagine that ZFS would need first to resilver all the blocks that had previously been copied and then finish the expansion.

  3. The absolute worst case is that the ZFS coders never anticipated needing to resilver the expansion disk part way through expansion - and your pool is now in a state where no tools can fully recover it and it is permanently degraded.

Perhaps @kris or @honeybadger can advise what will happen and what actions you should take based on more detailed knowledge.

ZFS itself appears to have gine the best advice: Replace the SMR drive with a CMR drive.

The intercation between resilver and expansion has been considered: Expansion is only performed on healthy pools, and is therefore paused whenever a resilver is necessary.

I think the SMR disk did it’s timeout thing during expansion because of these 3 SMART values;

None reached the threshold for the drive to consider it’s self bad. But, ZFS also has timing issues that are independent of SMART values.

My opinion is that;

  1. The scrub has little to do with the problem. It likely started as normal, after the RAID-Zx expansion was paused. Though it is possible it was started due to the pause of the RAID-Zx expansion. (All completed RAID-Zx expansions are immediately followed by a pool scrub, which is mandatory.)
  2. The RAID-Zx expansion was paused because of timeouts from the “new” SMR disk, which caused the drive to appear failed to ZFS.
  3. The “new” SMR drive is now a permanent part of the pool.
  4. Rebooting won’t help anything.
  5. The “new” SMR drive should be replaced sooner rather than later.
  6. Whence the replacement drive has been re-silvered, the RAID-Zx expansion can resumed. (Or will automatically resume…)

The above, as I stated, are my opinions.

Item 5 says sooner rather than later, because it is possible that some data is no longer covered by RAID-Z1 parity. So a bad block in another disk could result in data loss in a file. (But not the whole pool, unless another disk goes bad completely.)

Further, when replacing the “new” SMR disk, I’d suggest replace in place. Meaning install the new replacement disk in to the server and leaving the “new” SMR disk in place too. This gives a higher chance of a successful replacement. Of course, this requires a disk slot, power cables and a SATA port. Which if you don’t have such, then you have to perform the normal disk replacement and take your chances.

It MAY be possible to resume the RAID-Zx expansion on the “new” SMR disk. This can possibly be done by using the suggested clear command as below. But, the same problem may re-occur.
zpool clear Mother

I am in two minds whether it would be better to resume the expansion on the SMR drive whilst waiting for the new CMR replacement thus increasing the number of blocks reliant on the SMR drive for redundancy in the hope that it will eventually finish and have a non-degraded, fully redundant, fully expanded pool which would be the base for a completely standard resilver, or to wait for the new drive and do a resilver followed by resuming the expansion (which is much less tested but which leaves the majority of the data redundant even during the resilver.

On the whole my gut reaction is that it would be better to wait.

P.S. I am not sure whether setting higher TLER values than the standard 70 decisecs (i.e. 7 seconds) would help avoid errors. I am, however, unclear whether these error values are a result of TLER or whether they indicate internal errors unrelated to TLER.

Just giving an update.
Over the last few days, I’ve been backing up my data and have ordered the new ironwolf drive (which I now have.)

I’ve decided to take Arwen’s advice and am now replacing in place. Currently re-silvering.

Things to note: After startup, the expansion job was no longer queued, but vpool status through shell reports the same expansion progress and degraded status.

Will update when done.

See you in a few weeks then. :stuck_out_tongue_winking_eye: