NAS in a VM, share disks

Andre_x

Member
Feb 15, 2021
33
2
13
41
Hi all,
I have a Proxmox PC with a PCI SAS controller with connected 2 (for now) 6TB drives.
I need to use these drives into OMV (VM) and into some other VMs.
Is it better to passthrough the whole PCI card to the OMV VM, manage the disks in it, create the shares and mount them into the other VMs (which protocol would be better?) or is it better to mount the disks in the OMV VM (without any passthrough) and use those disks with the other VMs too?
Other ways to accomplish my need?
Thanks!
 
Is it better to passthrough the whole PCI card to the OMV VM, manage the disks in it, create the shares and mount them into the other VMs (which protocol would be better?) or is it better to mount the disks in the OMV VM (without any passthrough) and use those disks with the other VMs too?
Mount a disk on multiple OSs at the same time (like two different VMs or host + VM) and you will corrupt the data on it.
Is it better to passthrough the whole PCI card to the OMV VM, manage the disks in it, create the shares and mount them into the other VMs (which protocol would be better?)
I pesonally would passthrough the HBA and work with SMB/NFS shares. But this depends on your situation. Passing through devices for example will make your VM always use 100% of its assigned RAM and you won`t be able to migrate that VM between nodes.
 
  • Like
Reactions: Andre_x
Mount a disk on multiple OSs at the same time (like two different VMs or host + VM) and you will corrupt the data on it.

I pesonally would passthrough the HBA and work with SMB/NFS shares. But this depends on your situation. Passing through devices for example will make your VM always use 100% of its assigned RAM and you won`t be able to migrate that VM between nodes.
Thanks for your reply!
Is there a way to have a disk available in the VM (without passthrough) and beeing able to read it if connected to a different PC or will I always have a virtual HD file in the drive?
 
Is there a way to have a disk available in the VM (without passthrough) and beeing able to read it if connected to a different PC or will I always have a virtual HD file in the drive?
Only via SMB/NFS (and the other network shares like webDAV, ...) if you want to access it from another PC. VirtFS(9p) would allow you use something similar to bind-mounts, just for VMs. Didn't used the last one yet but from what I've read so far it isn't integrated in PVE yet and not that advanced in developement.
 
Last edited:
Only via SMB/NFS/VirtFS(9p). Didn't used the last one yet but from what I've read so far it isn't integrated in PVE yet and not that advanced in developement.
Would you prefer to use SMB/NFS or to just create a virtual HD? Those virtual HD files are readable from other PC, correct?
 
Those virtual HD files are readable from other PC, correct?
No, only by the VM/LXC you created it for. Think of them like physical HDDs. You can't connect a HDD to two PCs at the same time. Nothing different with virtual disks.
 
Last edited:
No, only by the VM/LXC you created it for. Think of them like physical HDDs. You can't connect a HDD to two PCs at the same time. Nothing dfferent with virtual disks.
No no, sorry, I meant if I disconnect the physical disk and connect to a new PC.
Is it possible to create a BTRFS pool withit Proxmox UI?
 
Is it possible to create a BTRFS pool withit Proxmox UI?
Yes.
No no, sorry, I meant if I disconnect the physical disk and connect to a new PC.
Depends on the OS accessing them. It needs to support btrfs, ZFS, ext4, LVM or whatever you use. Windows for example won't natively support any of those.
 
Last edited:
Yes.

Depends on the OS accessing them. It needs to support btrfs, ZFS, ext4, LVM or whatever you use.
Yes, that I know, but once the disk is mounted, is it possible to mount the qcow2 files and read what's in it?

>>Is it possible to create a BTRFS pool withit Proxmox UI?
Yes.

Hemmm...could you please point me to a guide? I only see ZFS under Disks.
Thanks!
 
Last edited:
Yes, that I know, but once the disk is mounted, is it possible to mount the qcow2 files and read what's in it?
PVE is block-device centric. You usually don't work with qcow2 to prevent the overhead of that additional unneccesaary filesystem.
But yes, qcow2 could be moved to some other machine and be read there. Just make sure not two OSs are trying to mount that qcow2 at the same time. You might need to convert it to vmdk or whatever your other PC is able to work with.

Hemmm...could you please point me to a guide? I only see ZFS under Disks.
Thanks!
What PVE version you are running? Btrfs was added as a feature preview (so not stable!) with late PVE7 or early PVE8. With recent PVE version ita available when installing PVE. Not sure if it is later available in the webUI for anyting else than the root filesystem.
 
Last edited:
What PVE version you are running? Btrfs was added as a feature preview (so not stable!) with late PVE7 or early PVE8. With recent PVE version ita available when installing PVE. Not sure if it is later available in the webUI for anyting else than the root filesystem.
I've just installed 8.1.10
 

Attachments

  • 1712234178188.png
    1712234178188.png
    3.7 KB · Views: 4
I guess then its only available via CLI. PVE is based on Debian 12. So any Debian tutorial should work and you then could point a directory storage to its mountpoint to use it in PVE (won't make use of any btrfs features like snapshots).
 
Not as far as I know.
But you might want to try ZFS. It covers most of the btrfs features, got even more and is more mature and well integrated in PVE for many years.
 
But you might want to try ZFS. It covers most of the btrfs features, got even more and is more mature and well integrated in PVE for many years.
I'll give it a try, but I've read on different posts that it's more complicate to manage than BTRFS.

Edit: And with BTRFS it's possible to add drive of different size without any problem.
 
Last edited:
I'll give it a try, but I've read on different posts that it's more complicate to manage than BTRFS
Yes, not the easiest one to unterstand. But once you understand it and you got proper hardware for it, you probably want nothing else.
 

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!