HDD Passthrough and Truenas question.

boonemeat

New Member
Feb 24, 2024
2
0
1
If I passthrough hard drives into a Truenas virtual machine, is the data on these safe if the VM were to be deleted or have issues?
 
I like to run two TrueNAS VMs on different servers, both with identical pools and then I use the replication jobs of TrueNAS to keep them in sync. So if one VM/server blows up, I still got the other one running and working. But won't help you in case there is ransomware, human error, ZFS bugs and so on. I for example once was able to name a snapshot something like "snapshot@name" via the TrueNAS webUI and this didn't fail and somehow created a snapshot like "pool/dataset@snapshot@name". And as "@" is a forbidden character for snapshot names not even any "zpool/zfs -f" command would work. Wasn't possible to destroy the snapshot and even a "zpool destroy" was failing because of this so I had to wipe the disks via Live Linux and start from scratch... . Simply keeping the snapshot also wasn't an option as I would never have been able to free up any space for stuff that I deleted. No idea how TrueNAS was able to "accomplish" this, because I experimented with "zfs snapshot pool/dataset@snapshot@name" after backing up all 24TB of the pool and before wiping the disks and this was failing with ZFS complaining about the "@" in the name. So even with that missing check for valid chars on the TrueNAS middleware, to prevent idiots from doing stupid stuff, this shouldn't have been possible in the first place...
So in short, if you do not want to run in such problems don't trust a single software/filesystem/media and follow the 3-2-1 backup rule and use different media and maybe offline backups. Like getting some additional USB Disks for backup rotation, formating with something that isn't ZFS and storing them offline and well protected offsite.
 
Last edited:
If I passthrough hard drives into a Truenas virtual machine, is the data on these safe if the VM were to be deleted or have issues?

I think the answer you want to hear is this:

If you accidenttally deleten the VM, then the data on the HDD you passthrough stays. Only the virtual disks are deleted. So worse case, you create another vm with scale, upload the truenas config(wich i hope you backup everytime you make system changes) passthrough the HDD again, then everything should be up and running again.

with the question what if vm were to have issues like what do you exactly mean? like as long as you did not destroy your pool created from those passthrough HDD then you are fine. You can just import the pool
 
I think the answer you want to hear is this:

If you accidenttally deleten the VM, then the data on the HDD you passthrough stays. Only the virtual disks are deleted. So worse case, you create another vm with scale, upload the truenas config(wich i hope you backup everytime you make system changes) passthrough the HDD again, then everything should be up and running again.

with the question what if vm were to have issues like what do you exactly mean? like as long as you did not destroy your pool created from those passthrough HDD then you are fine. You can just import the pool
Exactly what I was looking for, thank you. I understand the idea of redundancy and the 321 rule. I know that when you create virtual disks, it is set up for proxmox. I was wondering if disks passed through were somehow modified for proxmox, not just Truenas.
 
I know that when you create virtual disks, it is set up for proxmox. I was wondering if disks passed through were somehow modified for proxmox, not just Truenas.
They are unless you PCI passthrough a HBA with the disks attached to it. TrueNAS will only see your disks as virtual disks and stuff like SMART for example won't work because this is not emulated and TrueNAS will see the disks as 512B/512B logical/physical sectors even if your physical disks are using 512B/4K or 4k/4k. And the VM will fail to start if one of the physical disks isn'T available even if TrueNAS wouldn't have a problem with it because of a redundant pool layout.
But yes, destroying the VM won't wipe your physical disks.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!