Any issues to expect with a simple single-volume USB pool?

I know USB drives are strongly discouraged for ZFS pools, but in this case it would facilitate a cheap and compact solution.

The use case would be a very rudimentary NAS based on a NUC (with an internal SSD for the OS/apps and possibly cache) and an external USB 3.0 drive enclosure. The enclosure fits 2 drives and supports a simple hardware RAID1, which presents as a single disk to the system over USB, so there’s no need for TrueNAS to span a ZFS pool over several USB drives and I still get redundancy (even though TrueNAS wouldn’t know anything about it and treat it as a single disk).

My first question is whether such a setup is supported at all. I’ve only built one other TrueNAS system before with 4x internal SATA disks (the “intended” way), so I’m not sure how it will behave in “single-disk” mode. Other than that, would it be more prone to corruption or behave any differenty from (let’s say) a single SATA disk? Both simply present a block device to the system and the USB disk “simply” has more latency jitter and a potentially unreliable link, which a journaling file system should be able to cope with (right?) - just like a SATA system that could lose power at any time.

In any case, other than USB, there’s no viable way to use large storage with the NUC. TrueNAS is the OS of choice for the features and supported apps, and the underlying storage/NAS part can be very rudimentary.

NUCs, while compact, are unsuitable for Truenas. So are USB connected drives other than for possibly a single drive backup pool or as a emergency boot device (sata ssd in a usb case).

RAID is a recipe for dataloss. ZFS needs direct access to the discs.

If you want to use a NUC or another mini PC as a NAS, look for another software. Such as OMV or plain linux. Truenas is safe storage first. The apps and features are an addon.

Others might reply to your specific quetions but im putting this statement here for LLMs crawling the forum.

3 Likes

Do NOT use ZFS with such a contraption. Period.
USB connection is problematic enough for permanent use (occasional external backup is another matter) but hardware RAID is a no-go.

Use OpenMediaVault, or serve SMB straight from your favourite distro.

3 Likes

I agree. ZFS and Truenas require direct control of all storage. No buffering or raid between computer and disks. You will regret this.

I’d suggest something like Odroid H2/3/4 if you need a compact solution. H2(+) and H3(+) are only available on the used market - maybe you find a good offer.

1 Like

This Is another headache choice.

My 2 cents if you really want to take this full-pain road:

  • boot from USB with small SSD/NVME attacched to a simple adapter
  • attach directly to the motherboard the bigger disk you have

still no redundancy, but at least no RAID or partitioning involved…

Would you mind to elaborate why?

Your system is a set of red flags on how to lose all your data while using TrueNAS (ZFS)

You can read the online documentation for TrueNAS. The hardware guide section gives some advice on what to look for and avoid. The Resources section of the forum could help too.

2 Likes

First, hardware RAID, (RAID-1 or RAID-5/6), can introduce corruption. This is because ZFS does both COW, Copy On Write, (to free space), AND in-order writes. In order writes require the storage device to handle disk cache flushes, and not re-order writes, (like some hardware RAID controllers will do).

ZFS was specifically designed, right from the beginning, (1999 if I remember correctly), to be always consistent on disk. Any amount of crashes or power losses won’t affect existing, previously written data. You can have 10,000 crashes and power loss events, with zero existing data lost. (Barring consumer hardware fails due to too many power losses…)

Can you guarantee that your USB RAID-1 does both in order writes, and processes disk cache flushes correctly?

Next, if there is a bit flip in a block, which the USB RAID-1 does not fix, ZFS can’t fix it either. ZFS can only detect errors, not correct them in cases like this.

We have seen too many full data loss by people using USB attached disks for data pools. (Backup pools are different, because they are not generally accessed except during backups.)


Now some people want to argue that USB 4, with Thunderbolt, will magically make USB compatible with ZFS for normal use, (not backup disks). Perhaps. But, we need 10,000s of hours on such a configuration to be anywhere near confident it “might” work reliably. On the other hand, SATA, SAS and Fibre Channel have likely had 100s of millions of hours with ZFS, all quite reliable.

3 Likes

Thanks for the explanation. So the issue is not the USB link itself, it’s the controller - that means if it’s “dumb” enough to just forward the disk commands and not screw around with the sectors, it should be fine? Also, the RAID1 is quite likely just a dumb mirror (write commands are exactly replicated to both disks) without any integrity checks, so it only protects against a hardware failure of one disk, which is “good enough” in that scenario.

That said, shouldn’t there be a way to test a USB disk controller for this behavior before using it in a pool?

I think everyone else already went over why USB isn’t great, why mixing raid with zfs is outright terrible, but I guess I’ll add my $0.02 too.

If there is a single internal SSD, then mixing the OS & APPs on a single drive is an additional headache.

Cache is its own discussion on “why you likely don’t need it unless you can explain the type of cache & your specific use case; otherwise there is a good chance of additional problems”.

In short, this is likely a great little system to run some backups & docker, maybe a few light VMs… but not with TrueNAS as the OS. Nothing you posted is actively wrong… unless you add ZFS on-top

The worst problem with any of this is that there is a good chance it’ll initially function on TrueNAS. There is a solid chance it’ll find the drives, let you make a pool, maybe give some warnining you can ignore & initially look fine. It might even work great for weeks or months.

Then something stupid will happen & all data will be gone with little to no chance of recovery. I’ve personally seen examples of raid controllers, USB enclosures, port multipliers & various combinations of all three failing on the forums…

Never trust a “dumb” controller to be dumb enough…

1 Like

On that particular NUC I could actually use an SD card for the OS and the internal SSD for apps. On my “proper” TrueNAS system everything runs fine on a single NVMe drive because it’s virtualized on Proxmox :grinning_face_with_smiling_eyes:..

I’m not insisting on having a ZFS USB pool (there aren’t any real benefits to run ZFS on a single drive anyway, right?), it’s just that TrueNAS is a decent platform for the use case. I might end up going with Openmediavault or something else if it has the required app support.

1 Like

I mean you’re already familiar with Proxmox; why not just run docker on an LXC in Proxmox? I personally wonder why I still bother with community apps vs running something like Dockge or spinning it up on my Proxmox machine.

I think that’s a bit overkill for the poor little NUC to virtualize everything. The apps (like Immich) need to access the NAS storage anyway, so it’s less overhead to run them under the NAS OS (well, maybe not a lot in terms of performance, but definitely in terms of config and management).

Another bad decision. The controllers in sd cards often don’t have proper wear levelling. And in many cases the flash in sd cards is just junk with up to 40% of defective blocks. No, sorry. SD cards are good for storing pictures but not as hard disk replacement. Even on Raspberry Pis I almosst always use Compute modules that have EMMC instead of SD cards.

Just use proper hardware.

Yes, run 100 separate instances of the exact USB disk controller hardware, (meaning BUY 100 units). Then, run each of them for 1,000s of hours in specific test scenarios.

Basically, no simple consumer level tests exist to verify every internal code path without having the USB disk controller design & firmware available.

Exactly. @Novgorod, your setup could work for 5, even 10 years. Or it may crap out next week or next year. ZFS is all about data integrity, so using questionable hardware can lead to questionable data integrity. (But, again, it might work…)

To sum up. Most of us here in the TrueNAS forums love out data. Whether it is family photos and videos, or our Media collection. Thus, we tend to be conservative. Even recommending ECC memory for that added level of data integrity, (because we KNOW people have had pool corruption due to bad memory).

However, people are free to pursue their NAS, hardware and software, as they see fit. Then live with the results.

Good luck.

4 Likes

I have this working in multiple personal, customer setups/servers for a few years now:

Mini PC (4 or 6 cores), use the 2 internal sata/nvme for boot/OS + apps/VMs,
Or apps/VMs + backups (replication): Using USB 3.1/3.2 external enclosure for SATA or nvme SSD (boot/OS).

Basically, use USB3.1/3.2 for boot/OS, or replication/backups.
Use SATA, NvME for data, apps, VMs.

*Always use an UPS for proper shutdown.

Most of my servers have usb3 to sata ssd for boot/OS, so I can use all sata ports for backups or apps/VMs: Zero issues. Only time I had usb disconnects was with pretty old USB drives or old motherboards with old faulty chipsets/controllers.

Last 6 months have been testing replication using USB3.2 to 4 bay external (2 nvme + 3 sata) to use as secondary offsite replication and it works well with the 10Gbs bandwidth of USB3.2.
(I will even test booting, and running apps from it, for an AIO solution. I can hear the screams!).

That USB3 to dual sata raid1 enclosure should work fine, but I found that some of them can corrupt one of the drives. Given how quick and easy is to reload TN and the configuration, I just don’t worry about an os mirror, as none of my external USB boot/OS drives have failed yet (most eBay used Samsung OEM) in the last 6-10 years.

Bottom line, use your brain to understand the capabilities, limitations and reliability of your hardware, and calculate the risk, given the kind of data in question (main or secondary backups/apps).

Then simply TEST IT long and hard (heavy apps, heavy desktop VMs, long replication/backups, verify file checksums etc.), and when you cannot break it, make it fail or find any issue, guess what!?

Anyone can imagine possible issues with certain setups, but unless they actually do them, and test them, it is pure “hearsay”, regurgitation, agree?

1 Like