Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Trouble replacing disk in ZFS pool

Featured Replies

  • Community Expert

I am running 6.12.11. I have a RAIDZ1 consisting of eight 2TB SSDs. I started getting reallocated sector errors on the first disk in the pool. I added a new disk of the same make/model/capacity to my server. I stopped the array and replaced the old error-prone disk with the new disk in the pool. I started the array. This is now the pool status:

 

  pool: cache
 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: resilvered 16.2M in 00:00:00 with 0 errors on Mon Sep 30 18:22:22 2024
config:

	NAME                      STATE     READ WRITE CKSUM
	cache                     DEGRADED     0     0     0
	  raidz1-0                DEGRADED     0     0     0
	    /dev/sdx1             ONLINE       0     0     0
	    /dev/sdw1             ONLINE       0     0     0
	    /dev/sdv1             ONLINE       0     0     0
	    /dev/sdu1             ONLINE       0     0     0
	    /dev/sdt1             ONLINE       0     0     0
	    /dev/sds1             ONLINE       0     0     0
	    /dev/sdr1             ONLINE       0     0     0
	    12765205234715690366  UNAVAIL      0     0     0  was /dev/sdj1

errors: No known data errors

 

How do I successfully replace the old disk with the new one and remove the DEGRADED state? Thanks! 

Solved by JorgeB

  • Community Expert

The pool devices are not assigned in the original order, that can cause issues, I assume the pool was not created with Unraid? Or was re-imported?

 

Reboot to clear the logs, don't start the array, post the output from 

zpool import

 

 

  • Author
  • Community Expert

I used Unraid to create the pool.

 

Here is the output from running zpool import after rebooting and not starting the array:

 

   pool: cache
     id: 3975473903692486089
  state: DEGRADED
status: One or more devices contains corrupted data.
 action: The pool can be imported despite missing or damaged devices.  The
        fault tolerance of the pool may be compromised if imported.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-4J
 config:

        cache                     DEGRADED
          raidz1-0                DEGRADED
            sdx1                  ONLINE
            sdw1                  ONLINE
            sdv1                  ONLINE
            sdu1                  ONLINE
            sdt1                  ONLINE
            sds1                  ONLINE
            sdr1                  ONLINE
            12765205234715690366  UNAVAIL

 

Also attached are the diagnostics after rebooting.

pterodactyl-diagnostics-20241001-1632.zip

  • Community Expert

Do this now:

 

-unassign all pool devices

-start array, stop array

-re-assign only the 7 good devices to the pool, in the same order as the zpool import shows:

sdx

sdw

sdv

etc

-leave slot 8 unassigned 

-start the array and the pool should import degraded

-if yes, stop the array, assign the missing device to slot 8, start the array to begin resilvering.

  • Author
  • Community Expert

When I unassign all of the pool devices, which I assume means setting them to "no device," the button to start the array is grayed out. There is an option to check a "Yes, I want to do this" box, so "Start will remove the missing cache disk and then bring the array on-line." Do I want to do this?

 

Also, it appears the drive order in zpool import is reversed. The order in the Unraid GUI for my pool (named "Cache") looks like this:

 

Cache - sdq (new drive)

Cache 2 - sdr

Cache 3 - sds

Cache 4 - sdt

Cache 5 - sdu

Cache 6 - sdv

Cache 7 - sdw

Cache 8 - sdx

 

If I follow your instructions correctly, should I assign the new order as follows?

 

Cache - sdx

Cache 2 - sdw

Cache 3 - sdv

Cache 4 - sdu

Cache 5 - sdt

Cache 6 - sds

Cache 7 - sdr

Cache 8 - sdq

 

Thanks!

  • Community Expert
  • Solution
32 minutes ago, marionza said:

Do I want to do this?

Yes.

 

33 minutes ago, marionza said:

If I follow your instructions correctly, should I assign the new order as follows?

Correct, but don't forget that cache8 should stay empty initially.

  • Author
  • Community Expert

That worked and we are now resilvering! You're the best, @JorgeB! Thank you!

  • Community Expert

Glad to year, and thanks for the beer money!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.