Sharing a drive within VMs and with external Windows OSes

tcgmilaor

Member
Jul 14, 2021
7
0
6
24
Philippines
Hi everyone!
I would like to set up a drive/storage/pool in Proxmox that can meet the following criteria:

Proxmox_Setup.png


Is this setup possible to do in Proxmox? Thank you!
 
Create a LXC, install a SMB server inside it (or a NAS OS like OpenMEdiaVault for easier management of the shares), bind-mount the mountpoint of a ZFS dataset (or just a ext4 partition if you use HW raid) into the LXC so the LXCs SMB server can share it.
 
Create a LXC, install a SMB server inside it (or a NAS OS like OpenMEdiaVault for easier management of the shares), bind-mount the mountpoint of a ZFS dataset (or just a ext4 partition if you use HW raid) into the LXC so the LXCs SMB server can share it.
Thank you for this!
However, I would like to avoid using a dedicated LXC or Guest just for Samba shares. I was wondering if this is doable with the Storage options built into Proxmox (possibly ZFS sharing)?
 
Proxmox got no build in NAS functionality. It is based on Debian, so you could install and setup as much stuff as you like, but installing stuff on the host itself isn't very clean. Keep in mind that you will sooner or later need to reinstall proxmox. It is really a pain if you modified your host and need to install and setup all stuff like SMB shares again. If you got your services all in VMs or LXCs its a matter of minutes and just some clicks to restore everything from backups to a freshly installed Proxmox. And there is no performance or capacity disadvantage running your SMB shares inside a privileged LXC compared to directly running it on the host.

ZFS can share datasets using SMB ("sharesmb" option) but I think you still need to install a SMB server for that.
 
Last edited:
Proxmox got no build in NAS functionality. It is based on Debian, so you could install and setup as much stuff as you like, but installing stuff on the host itself isn't very clean. Keep in mind that you will sooner or later need to reinstall proxmox. It is really a pain if you modified your host and need to install and setup all stuff like SMB shares again. If you got your services all in VMs or LXCs its a matter of minutes and just some clicks to restore everything from backups to a freshly installed Proxmox. And there is no performance or capacity disadvantage running your SMB shares inside a privileged LXC compared to directly running it on the host.

ZFS can share datasets using SMB ("sharesmb" option) but I think you still need to install a SMB server for that.
Got it.

So I suppose that I'll be making the drive pool ZFS then. I will also be making another VM (OpenMediaVault) to create the SMB shares. Is this correct?
 
Got it.

So I suppose that I'll be making the drive pool ZFS then. I will also be making another VM (OpenMediaVault) to create the SMB shares. Is this correct?
LXC and not a VM. You can't bind-mount ZFS datasets into a VM. That is only possible with LXCs. And make sure you disable the "unprivileged" checkbox while creating it to get a privileged LXC. Or it would be very annoying to manage the bind-mounts because of the user/group remapping.
 
LXC and not a VM. You can't bind-mount ZFS datasets into a VM. That is only possible with LXCs. And make sure you disable the "unprivileged" checkbox while creating it to get a privileged LXC. Or it would be very annoying to manage the bind-mounts because of the user/group remapping.
I'll be needing to convert the OpenMediaVault ISO to an LXC, right? Not a full OpenMediaVault guest?
 
You don't need the OpenMediaVault ISO. You can install OpenMediaVault ontop of a Debian Buster. So you can use the "debian-10-standard" template as a base, add the OpenMediaVault repository to it and install it using apt install openmediavault-keyring openmediavault.
 
You don't need the OpenMediaVault ISO. You can install OpenMediaVault ontop of a Debian Buster. So you can use the "debian-10-standard" template as a base, add the OpenMediaVault repository to it and install it using apt install openmediavault-keyring openmediavault.
Oh, alright! Thank you very much.

Will report back once it's setup!
 
You don't need the OpenMediaVault ISO. You can install OpenMediaVault ontop of a Debian Buster. So you can use the "debian-10-standard" template as a base, add the OpenMediaVault repository to it and install it using apt install openmediavault-keyring openmediavault.
Update here:

I just realized that my HW Raid (IBM ServeRAID M5110e) doesn't support HBA mode. ZFS won't be possible here. I'm instead looking at having the 2x 4TB drives in RAID0 via hardware and just making an LVM-Thin filesystem inside it.

Apparently, the HW RAID card that I have supports JBOD mode. Will do ZFS RAID0 on the said drives!
 
Last edited:
JBOD is not the same as a HBA. What you want with a Raid controller is the IT mode (initiator target mode). It presents each drive individually to the host without any abstraction or manipulation between the drive and the host. JBOD might work but you need to verify that ZFS is able to directly control the drives.
 
JBOD is not the same as a HBA. What you want with a Raid controller is the IT mode (initiator target mode). It presents each drive individually to the host without any abstraction or manipulation between the drive and the host. JBOD might work but you need to verify that ZFS is able to directly control the drives.
Hmmmm, that I'm actually not sure on how to check if ZFS can directly control the drives.
However, I do see complete S.M.A.R.T statuses, serial numbers of the drives, and the model numbers of the drives on Proxmox now. I suppose that this JBOD mode that my built-in RAID card supports full pass-through mode for the drives.

To add: I have seen some articles that I could flash my built-in RAID card with a different BIOS that supports IT mode, however, I'm not that comfortable in doing so because the RAID card is physically built-in to the motherboard of the server (IBM System x3650 M4 with the IBM ServeRAID M5110e RAID Card).
 
Last edited:
Hmmmm, that I'm actually not sure on how to check if ZFS can directly control the drives.
However, I do see complete S.M.A.R.T statuses, serial numbers of the drives, and the model numbers of the drives on Proxmox now. I suppose that this JBOD mode that my built-in RAID card supports full pass-through mode for the drives.
That sounds ok.
To add: I have seen some articles that I could flash my built-in RAID card with a different BIOS that supports IT mode, however, I'm not that comfortable in doing so because the RAID card is physically built-in to the motherboard of the server (IBM System x3650 M4).
Onboard I wouldn't flash it neither.