ZFS pools over multiple VMS

Nicholas Phelps

New Member
Apr 3, 2020
7
0
1
31
Can the drives I pass to a VM through /wiki/Physical_disk_to_kvm guide be used on multiple Vms?

Here is the guide I followed to assign my HDDs to my FreeNAS VM:
https://pve.proxmox.com/wiki/Physical_disk_to_kvm

Before I did this I configured the 3 4TB drives in raidz ZFS pool. Did I do this right? Or should I not have done the ZFS?
My goal is to take the ZFS pool I have and be able to use it as the storage for all of my data and then let all of my VMs have access to it.
 
If you pass your drives to a guest directly, only the guest can access it. Access for any other VM or physical host would have to go via FreeNAS' sharing.
 
If you pass your drives to a guest directly, only the guest can access it. Access for any other VM or physical host would have to go via FreeNAS' sharing.

So how do I just make them shareable? I have my ZFS pool shared in a NFS share mow but how to I give my VMs access to that? Just add it as a harddrive to my VM?
 
I still don't get, what you are trying to achieve. You can share a ZFS from your ZPOOL out via NFS, no problem with that. Any VM that has it's virtual drives be located on the very same ZPOOL will create a ZVOL(s) within the root ZFS, which will nibble space away from your NFS share. Please keep in mind that ZVOLs are thin by nature and you should keep an close eye amount of data that you provision and the actual amount of data stored on the ZPOOL. In other words… don't over-provision your ZPOOL.
 
I still don't get, what you are trying to achieve. You can share a ZFS from your ZPOOL out via NFS, no problem with that. Any VM that has it's virtual drives be located on the very same ZPOOL will create a ZVOL(s) within the root ZFS, which will nibble space away from your NFS share. Please keep in mind that ZVOLs are thin by nature and you should keep an close eye amount of data that you provision and the actual amount of data stored on the ZPOOL. In other words… don't over-provision your ZPOOL.

I think the problem is that I am a total beginner and I don't know what is possible let alone how to word what I want to do.

I have my Proxmox OS on mirrored SSDs. My VMs (Currently just FreeNAS but there will be more later) are also installed on them. I then have 3 4TB HHDs that are set in raidz through ZFS. I basically want any VM that I set up to be able to see that ZFS pool.

I thought I set up a NFS share of my ZFS pool last night but now when I look in my Storage section of my node it is gone. So now I'm even more confused.

Sorry if it's frustrating talking to someone who knows nothing yet, I'm slowly working through a bunch of guides and literature to try and get a little more knowledge.
 
Okay… let's start with a basic layout and try to tackle one thing at a time. As you pointed out, you do have currently these storage devices:

  • 2x 128GB SSD
  • 3 x 4TB HDD

You setup a ZPOOL from the two SSDs and installed PVE on it. I assume. that you then installed FreeNA in a VM on the local zfs-storage, so also on the zpool mirror, is that right? Maybe you could share a screenshot of your storage setup from the gui.

Now, for the 3 x 4 TB drives… I am not really sure, I understand what you did to them… you said, you created a raidz1, but you also stated that you paased the drives directly to the FreeNAS VM. If this is correct, you wound up with the following situation:

  • PVE doesn't show this ZPOOL anymore, since you took access away from it and it now, can't even see the drives - they are only visible to the FReeNAS VM
  • FreeNAS doesn't show the ZPOOL, since that ZPOOL is in a state of "unclean unmount" and you will have to force FreeNAS to import that ZPOOL, since it thinks , that this zpool belongs to some other host
I think the best approach would be to give the raidz1 ZPOOL back to PVE and create a virtual disk for your FreeNAS on it. Create a disk as big as needed and PVE will create a ZVOL for it on your ZPOOL and pass that to the FreeNAS VM, where you will get a storage device of the excat same size. This way the rest of the raidz1 ZPOOL will be free for other VMs, you might want to create on that PVE.
 

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!