How do I get a vdev back online

I have a usb drive that I use for my temp personal storage. It was unplugged when I booted and as such shows up in a pool as having a Offline VDEVs… I plugged the drive in and it shows up as online but the Vdev still shows as offline. How do I get the Vdev back online and assiged to the pool?

  1. Don’t use USB disks - its not a suitable connection method
  2. In the shell type “zpool import” and see what it says - post here
  3. Always post your hardware - it helps

zpool import seemed to import without errors
root@TrueNas[~]# root@TrueNas[~]# zpool import
pool: GeneralStorage
id: 7433741377666261024
state: ONLINE
status: Some supported features are not enabled on the pool.
(Note that they may be intentionally disabled if the
‘compatibility’ property is set.)
action: The pool can be imported using its name or numeric identifier, though
some features will not be available without an explicit ‘zpool upgrade’.
config:

    GeneralStorage  ONLINE
      sde2          ONLINE

It doesn’t appear to update the GUI though. The dashboard still says that the pool status of GeneralStorage is offline and the Storage topology stil says Offline VDEVs… How do I get that to update?

Thanks for the help. I understand a usb drive is not optimal and I will get a hardware post up…

As the pool seems to be importable you can import from the GUI
Storage/“Import Pool” (towards top right)

When I attempt the import pool from the gui, it does not have a pool in the dropdown to import.

This may indicate one of the problems with USB attached storage. If the serial number of the USB controller for the drive is not unique, the TrueNAS Middleware / GUI may get confused.

Do you have any other USB attached storage?
Like for your boot pool?

With that said, you can manually import the pool from the command line. I just don’t have the syntax handy.

You probably need to export the pool from the command line before you can import it again from the GUI.

When I do a zpool import GeneralStorage the system reboots. I have tried a zpool import GeneralStorage -f and it causes the system to reboot also.

Again if the USB attached disk has a non-unique serial number, the software could be getting confused and trying to use “both” paths to the device.

Run this command on all your disks and see if their are any duplicates with “/dev/sde”, your “GeneralStorage”;
smartctl -x /dev/sdX | grep -i serial
Replace “sdX” with each disk in sequence.

No they are all different

Posting first post quote from other thread since it contains hardware info

1 Like

Hmmm, their are some more options to import a pool, but they do involve throwing away recent data. The first is less extreme, but the second with “-X” is more extreme. Use as a last resort.

zpool import -F -o readonly=on GeneralStorage
And if that did not work, you could try;
zpool import -FX -o readonly=on GeneralStorage

You might need the -R /mnt option, I am not sure.


Beyond that, I'd suggest to use some other OS or other computer, that supports OpenZFS, to extract the data.

If that also causes a reboot, then the pool is likely corrupt beyond importation. That can occur with disk drivers or controllers, (USB in this case), that did not write disk blocks in the correct order. ZFS requires disk blocks to be written in specific order for COW, Copy On Write, to work correctly.

Thanks so much. I will give these a try. First I will try to use openzfs to see if I can get to the data before I try anything else. Thanks again for the path of hope…