Main Pool: RAIDZ1 (5x 2TB HDDs) - Working perfectly, thank goodness.
Additional Drives: 3x 1TB Toshiba USB externals
Alright, so I know what some of you are thinking… “Why, oh why, did you use USB drives?” Rest assured, this was purely a test pool. I’m fully aware of the community’s aversion to using USB drives for ZFS pools, but hey, sometimes we do these things just to experiment! So, here’s the scenario:
I created a striped pool named tank-pool-usb using two of the Toshiba USB drives. This pool was designed to handle some temporary, non-essential data for qBittorrent — just the temp files for downloads. Basically, this pool was meant to be disposable, and I thought, “What could possibly go wrong?”
Well, I recently upgraded to Electric Eel 24.10. The upgrade process itself went smoothly, and everything seemed fine until I rebooted. That’s when the USB-based tank-pool-usb decided to pull a Houdini on me.
What I Tried So Far:
I exported and disconnected the pool, checking the “remove config from TrueNAS” box. (Yeah, I know… probably my first mistake.)
After the reboot, the pool was nowhere to be seen. In the UI, it’s just offline with no option to import.
I attempted the zpool import tank-pool-usb command in the CLI, but got a very disappointing “no pool found.” Now I’m wondering if there’s any way to see what’s on those drives again. I don’t need the pool to be operational; I just want to pull some data off to transfer to my main pool before reassigning those USBs for something else, maybe backups or a less ambitious project.
The Ask:
Any ideas on how I could possibly recover that temp data? Or is this the universe telling me to never again trust a USB drive for ZFS pools? I’d appreciate any guidance, even if it’s just to laugh along with me about the perils of experimental USB pools on TrueNAS.
I’ll wait until more information is provided, but I can share my personal experience with you:
Using USB drives with ZFS is not as catastrophic as some people might allude. I have a series of single-drive ZFS pools (USB) that I use for simple, quick backups that I store offsite.
I regularly import them, run a replication, export them, store them offsite, and repeat.[1]
The only turmoil I’ve faced with USB drives and ZFS is when it comes to resilvering, and that’s only because the HDDs within the USB enclosure are SMR. (This is not relevant for single-drive stripes.)
I’ve never encountered any issues of pools simply “disappearing” because it’s a single-drive USB pool.
Beyond a simple two-way mirror of external USBs, I cannot speak for any other type of experience with ZFS pools and USB drives.
These are not my primary backups. But because USB drives are so cheap, and I have many spares, it’s a cost-free way to have extra cold storage offsite backups. ↩︎
Thanks for your reply, I ws cautious because I’ve read the horror stories and the hate when it comes to posts mentioning TrueNAS+USB.
The difference between you and me is that you did 1-HDD pools, I did a 2-HDD stripe, but I didn’t do any weird thing before the pool went rouge. I did read on other threads that removing+disconnecting the pool and trying to import could help, but it was not my case, I do want to reiterate I didn’t check the Wipe pool data option, so data should be there or so I think, I did check the “remove configuration from TrueNAS” (my bad) and confirm, so I do not know if there is a way to bring that pool back to life to at least move the temp data.
Update 2: I’ve reactivated the samba share and data is there 300+GB, so I might as well move that to my main pool and re-create another RAIDZ type, which one would you suggest?, should I just add the drives as single-drive stripes?
So as per my question, what would you advise for these drives?.
EDIT: I know it will sound like yeah you saved you a** now you want to insist on USB pools?, well no, I just wan to make use of those spare drives.
… If you create single-drive stripes, you won’t be making a raidz - you want to make a single raidz out of three disks, which will give you “two data, one parity” - but again, if all three disks go AWOL at the same time, that won’t solve anything.
You seem like you understand the risks here and aren’t storing anything irreplaceable.
Hi, I have the same problem, after rebooting my server, the USB-stick pool (mirrored across 2 sticks) was gone. Despite following @HoneyBadger solution, I did not manage to import my “Test” pool.
I am new to managing my own NAS, so I am a bit concerned about running into a relevant data loss in the future. Any ideas on what else to try and why this (USB stick) setting might create this issue?
Linux truenas 6.6.44-production+truenas #1 SMP PREEMPT_DYNAMIC Fri Nov 8 18:37:36 UTC 2024 x86_64
TrueNAS (c) 2009-2024, iXsystems, Inc.
All rights reserved.
TrueNAS code is released under the LGPLv3 and GPLv3 licenses with some
source files copyrighted by (c) iXsystems, Inc. All other components
are released under their own respective licenses.
For more information, documentation, help or support, go here:
http://truenas.com
Welcome to TrueNAS
Last login: Sat Dec 7 06:49:41 PST 2024 on pts/1
Warning: the supported mechanisms for making configuration changes
are the TrueNAS WebUI, CLI, and API exclusively. ALL OTHERS ARE
NOT SUPPORTED AND WILL RESULT IN UNDEFINED BEHAVIOR AND MAY
RESULT IN SYSTEM FAILURE.
truenas_admin@truenas[~]$ sudo zdb -l /dev/sda1
[sudo] password for truenas_admin:
------------------------------------
LABEL 0
------------------------------------
version: 5000
name: 'Test'
state: 0
txg: 4
pool_guid: 17845377176452215069
errata: 0
hostid: 1895473424
hostname: 'truenas'
top_guid: 12654679992834388406
guid: 7834860437356719089
vdev_children: 1
vdev_tree:
type: 'mirror'
id: 0
guid: 12654679992834388406
metaslab_array: 70
metaslab_shift: 29
ashift: 12
asize: 15721824256
is_log: 0
create_txg: 4
children[0]:
type: 'disk'
id: 0
guid: 6942021077957437462
path: '/dev/disk/by-partuuid/52cff84c-1236-4281-a895-3809378fd4c9'
whole_disk: 0
create_txg: 4
children[1]:
type: 'disk'
id: 1
guid: 7834860437356719089
path: '/dev/disk/by-partuuid/399f5357-e16e-4ceb-b601-a94c9df378e5'
whole_disk: 0
create_txg: 4
features_for_read:
com.delphix:hole_birth
com.delphix:embedded_data
com.klarasystems:vdev_zaps_v2
labels = 0 1 2 3
truenas_admin@truenas[~]$ sudo zpool import 17845377176452215069 -R /mnt
cannot import '17845377176452215069': no such pool available
truenas_admin@truenas[~]$ sudo zpool import
no pools available to import
truenas_admin@truenas[~]$ sudo zpool import Test -R /mnt
cannot import 'Test': no such pool available
I’ll argue that it is expected.
You are using hardware not suited for the job. USB is unreliable and USB-sticks even less so. This is something the documentation specially points out.
Because of that, iX likely does not test USB-devices and are unlikely to fix issues stemming from their usage. You are on your own, any and all errors should be expected and contingencies to handle the issues planned for.
Part of the problem with USB drives is that the serial numbers may be from the enclosure, and not the drive. Many USB enclosures or flash drives use non-unique serial numbers. This confuses the normal TrueNAS pool detection scheme.
I suspect you’re hitting another edge case that we’re encountering (as a result of an upstream blkid issue, I believe) - especially if those USB disks were previously formatted with a different filesystem.
Can you post the results of sudo blkid --probe /dev/sda1 (assuming that your USB drive is sda) and then repeat this for /dev/sdb1