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.

Cache pool degraded - replace ssd

Featured Replies

Hi,

My zfs cache pool with 2 slots has degraded. Not sure what's the root cause. But need the array back, so I guess will have to rebuild the pool.

Since one of the two SSD disks is old and far beyond the write limits, I decided to not rebuild the pool mirror onto it and got a replacement.

My cache-b shows 1 vdev with 3 devices. I never had 3 devices on this pool. (diag attached). So the pool config got corrupted?

My idea now is to:

1) Remove the pool

2) Re-create a 2 slot zfs pool with same name (cache-b) and props

3) Assign the good disk to slot 1, none to slot 2 and Start Array

4) Optional: copy the data of the pool into array (backup).

5) Stop the array and assign new disk (pre-cleared) to the 2nd slot

6) Start array so that the zfs pool is rebuild

Is this plan correct? (double checking here, don't want to lose data).

nedio-server-diagnostics-20261028-0823.zip

Solved by JorgeB

  • Community Expert
  • Solution

Before you change anything, there are two problems to fix.

1. Your flash drive is read-only. At boot it reported filesystem errors, and Linux set it read-only. Unraid can't save any configuration changes until this is fixed, so pool changes would not persist. Shut down, make a backup of the flash drive on another computer, then run a disk check/repair on it (on Windows: Properties > Tools > Check). Then boot again. If errors come back, replace the flash drive.

2. About the pool. The 840 EVO is not detected at all, which is why the pool is degraded. The "3 devices" comes from a pool setting that doesn't match the 2 slots, so Unraid reports the pool config as invalid. This doesn't mean the data on the 870 EVO is damaged.

Please don't follow your plan as written. On 7.3.x there is a known issue when a ZFS mirror is started with a missing member: Unraid can remove the missing member and, in some cases, damage the remaining disk. Avoid any degraded start of this pool from the GUI. Do this instead:

1. With the array stopped, disable the VM service (Settings > VM Manager), because the domains share is on cache-b.

2. Remove the cache-b pool and start the array without it. The 870 EVO will show as an unassigned device, and Unraid won't touch it.

3. Mount the 870 EVO read-only from the console and copy the data to the array:

cryptsetup luksOpen --readonly /dev/disk/by-id/ata-Samsung_SSD_870_EVO_250GB_*-part1 cacheb

zpool import -d /dev/mapper/cacheb -o readonly=on -R /mnt/temp cache-b

zfs list

Enter your array encryption passphrase when asked. If the import asks for -f, add it. The data will be under /mnt/temp/mnt/cache-b. Copy it to an array disk with enough free space, for example:

rsync -avh /mnt/temp/mnt/cache-b/ /mnt/disk1/cache-b-backup/

Then:

zpool export cache-b

cryptsetup luksClose cacheb

4. Check that the backup is complete. Then erase the 870 EVO (click it, then Erase, with the array stopped). Create a new pool named cache-b with 2 slots, assign the 870 EVO and the new SSD, set the file system to ZFS encrypted, mirror. Start the array and format the pool. Keeping the same name means your share settings still work.

5. Copy the data back from the array to /mnt/cache-b and enable the VM service again.

The new SSD doesn't need a preclear. Preclearing an SSD only uses up its write life.

If the zpool import in step 3 gives an error, stop there and post the output.

  • Author

Thank you @JorgeB ! I will follow the steps you advised tonight.
The 840 EVO is not detected as I have disconnected it and connected the replacement disk already.

  • Community Expert

cfg file for cache-a is not correct, this is separate from cacbe-b. Assuming the pool is made of those two devices, you can reimport it:

on main click on the first device for that pool and then "remove pool"

back on main, create a new pool with the same name and number of slots

assign the pool devices, leave the filesystem set to auto

start the array to import the pool

If the pool fails to import post new diagnostics after the array starts

  • Author

did that. array started. looks good on the Main. phew.

before starting to format the cache-b, how should I verify that cache-a is in-tact now?

image.png

  • Community Expert

Post new diags please.

  • Community Expert

cache-a looks good. Both devices are online in the mirror, there are no errors, and it's mounted with all your datasets.

To confirm the data is good, run a scrub. Click cache-a on the Main page, then click Scrub. It should finish with 0 errors. Do the same for cache-b after you finish copying data to it.

I see that cache-b is already formatted as a mirror with both SSDs and has about 98GB used. When you have confirmed that all the data is back, enable the VM service again (Settings > VM Manager) and check that your VMs start. After that you can delete the backup from the array.

Your flash drive also looks fine now, there are no more errors.

  • Author

All the scrubs run ok, no errors. VMs started. I'd say the topic closed. Thank you @JorgeB!

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.