I’m trying to run a load of services and use TrueNAS Scale as the data storage for them. I have three 1 TB disks setup as RAIDZ1 - a single data pool. I’ve had to unplug the power a few times for various practical reasons and it seems like this setup simply cannot be relied on to function. Sometimes it’s fine, sometimes it’s not. I feel like I’m taking crazy pills here and cannot for the life of me figure out what I’m supposed to be doing.
I take a look at the storage dashboard and see “Unused disks: 3”. Okay, let’s add them back to my pool (“main”):
Add Disks To:
- New Pool
- Existing Pool
…except there’s no pools listed under “existing pool”. If I create a new one it just wipes the disks. That’s no bloody good.
Thankfully I’ve yet to store any important data on them as I’m still in the testing phase. As far as I can see though, despite the disks being attached to the system by serial number, it gets confused and doesn’t keep them through power disruptions.
Is it worth fannying about with TrueNAS? I feel like I might as well just bin ZFS and use an rsync-based backing up of data (I have several other disks, but only three that are the same size).
Okay so when you say “unplug the power” do you mean shut it down first or just pull the plug? The latter is a great way to corrupt your storage pools as ZFS uses memory for read and write cache etc by default. You definitely need to do a graceful shutdown especially if there is data that was recently written to disk, that’s why a UPS is so recommended. That said you can usually import an existing pool when that happens, I think there is a UI menu for it now.
The hard disks are on a separate power supply. The TrueNAS software is running on an old laptop so it effectively has UPS protection.
Okay so the disks aren’t also on UPS? That might actually be even worse than the whole thing getting turned off, ZFS is definitely not meant to be run on removable disks like that.
Haha, yeah. It does make me wonder whether I should bin the whole TrueNAS approach entirely. It seems like a tremendous faff when I could just have the files mirrored to another disk as a backup.
If you shut down the computer gracefully first before you power the disks off it should be ok more often than not, but you really should try to have everything on the same system so this can all be coordinated by the OS and the hardware.
As others have said, avoid powering the disks off before the OS has had a chance to shut down or your disks will NOT be in a recoverable state when everything comes back online.
I’m not even sure the setup you are describing would benefit at all from a different storage method, even “regular” writes could be in memory or controller buffers. External drives are not meant to have their power cut.
I’d hit TrueNAS forums with that. They should be able to help you diagnose what’s up. TrueNAS is pretty reliable, I haven’t heard of anything like that happening before.
I’ll give it a shot. I was asking here in case it was a common thing that everyone else knows about (i.e. “Oh you’re running TrueNAS without a UPS? That’s a non starter, everyone knows that”.
Have been using TrueNAS for 13+ years since the FreeNAS 9.x days. Can attest to its bulletproof-ness in my case.
Would second asking in the iX forums. I’ve managed to get replication help directly from iX staff before when using the forum. You shouldn’t have this issue, and you will find answers.
I’ve moved my disks to a completely new machine with fresh install and then import my config, reboot and everything is as it was. I’ve also done the same without my config and imported the pool with no problems, just need to recreate shares, and any jails (a feature which I no longer use) would need to be reconfigured to be 100% functional.
Wild shot here, but are you sure your disks are healthy? They might have errors that could throw off truenas
How strange! Been using truenas scale for a couple years now and this is the first I’m hearing about this issue. You have to re add your disks to the pool each time you power cycle??
It seems to either be completely fine and a power cycle makes no difference - or it loses the whole structure. I don’t know how I’m supposed to pull the disks back in. It doesn’t seem to detect that they’re already setup as part of a pool.
The pool I’ve created doesn’t vanish but it seems my only option for it is “manage devices” which takes me to the “Add VDEVs to the Pool” menu where my three disks show up as unassigned. The only presented option seems to be to wipe them in order to add them back to the pool.
Trying to search for this stuff doesn’t seem to give me anything useful. I don’t know what the intended behaviour is and what it is that I’m doing wrong. I would expect what should happen is that the disks come back online and get automatically added back to the pool again but no, apparently not?
Since ZFS keeps the config info on disk, I’m with another commenter wondering about your disk health.
Check the SMART data for each drive.
What’s in the logs? What happens when you use zpool at the command line?
Which logs specifically should I be checking?
zpool doesn’t see any pools to import. The system does see the disks but I’m not sure why the disks aren’t being checked for pools.
I’m not familiar with truenas, but I imagine it must expose system logs. I recall that scale is based on Linux, so dmesg and journalctl should be available at a minimum.