Okay I saw this posted a lot and apparently it is pretty common but why do people virtualize your nas in for example a proxmox server/cluster. If that goes down it gets super hard to get your data back than if you do it bare Metal, doesn't it? Are people only doing it so save on seperate devices or are my concerns unreasonable?
Usually if you are doing something like that you are passing a SATA controller card/HBA directly to the VM and the drives are connected through that.
So all of the data would still be on those drives even if you blew up that VM entirely or proxmox corrupted itself.
On some levels it would be easier to recover from a system failure because you could have VM backups or snapshots to rely on.
It's a more advanced setup but it's not inherently "bad" or more risky. And yes, usually people are doing that type of thing because they don't need an entire separate physical server if they already have one with some spare cores and ram.
For example I have truenas running on a server that has a 6700k and 16GB of ram. That's overkill CPU for a Nas and I already have a 32 core 128GB ram server running. I'm migrating truenas to that server and giving it 4 cores and 32GB (still overkill for my needs). That will let me shut that other server down and save on my electric bill.
I actually did this for a few months until I saved up enough for a decent dedicated firewall appliance. Got a cheap PCIe 2x1GB NIC off Amazon and passed it directly to an OPNsense VM.
Honestly, it wasn’t that bad. The only downside is that that Proxmox server was just an old repurposed desktop PC that was super underpowered, so the VM only had like 2GB of RAM and that ended up being a bit of a bottleneck under load.
I'm doing it with openwrt x86, since I need SQM + wireguard (and at least the former still isn't supported on *sense last time I checked). Works fine in all honesty, and I can reboot the VM much faster than real hardware.
My NAS is a FreeBSD virtual machine. The drives are passed through directly to the Virtual Machine, so it is possible to take the drives out, and attach them to another virtual machine or bare metal computer running FreeBSD or TrueNAS and read them.
Just because it can be done it doesn't mean that is a good idea to do it. It all depends on what is your are trying to do and your risk profile. For me Networking, storage and computing are all in different devices.
I virtualize my NAS because it's small (only several TB) and therefore it can be backed up like any other VM with PBS or dumped as a qcow image. A full restoration is extremely easy because I can simply have another node pull the backup from PBS. Also I can migrate the entire NAS to another node so it stays up when I have downtime.
It mostly depends on your comfort level. Generally it is frowned on. I have a proxmox cluster with two dedicated machines. One for truenas and one for unRAID.
They both get basically the entire resources from the physical servers and have dedicated hbas. I haven't run into any performance issues, and actually prefer running it this way because if the nas vm dies for some reason I can still log into the hypervisor to fix it.
That said, I don't think I'd ever use virtual disks in a nas and I also wouldnt run vms off of the storage in the nas vm. At least not for the same cluster. I also make sure to have backups in case anything bad does happen
Hard to guess at for any given situation, but a few pluses that come to mind depending on the drive arrangement would be taking out any network latency issues between a client and the nas. Or if you have a VM using the nas as its operational drive it takes out the 'oops, lost the link and my OS drive went away' mid run factor. Keep all your container/vm traffic internal and have that single VM sync back to a bare metal... Might have to consider some ideas on that front myself now that I think of it.
I agree, proxmox or truenas by itself on baremetal should cover a lot of applications. Both can do most things the other can do to some extent but each has it's on specialties and focuses. Proxmox more for VMs, truenas for primarily storage/NAS. But both can do either.
Running the hypervisors built in to unraid or truenas are certainly options but proxmox/VMware are just easier. If you're learning about virtualization, you're going to find a lot more resources for proxmox/VMware. Conversely the storage capabilities of proxmox/VMware are either severely limited in the case of VMware or just not particularly user friendly for proxmox. By virtualizing your storage OS you can get the best of both worlds for some situations. Sure, there are situations where it's a bad idea but if you've only got one machine and it has plenty of resources it can be very effective.
Heck even if the main function for the NAS is just windows shares, that full blown storage OS is going to give you redundancy, snapshots, and replication. I'd say those are pretty important even for Windows shares.