It isn't easy but should work. Did the same some months ago.
You need to:
1.) create a unprivileged LXC ("debian-10-standard" as template) stored on your VM storage (1 vCPU, 512MB RAM, 256MB swap should be fine for a first test)
2.) run the
OMV installer script inside your LXC to turn that Debian 10 LXC into a OMV 5 LXC
3.) create a empty folder on your host as a mountpoint for the new disk (for example
mkdir /mnt/data && chown root:root /mnt/data
)
4.) partition your data disk (for example using fdisk or parted commands on your host) to have a single partition
5.) format your data disks partition with a linux filesystem of your choice (for example something like
mkfs.xfs /dev/yourDeviceAndPartition
on your host)
6.) make that partition automatically mount at boot to the folder created in step 2 by adding a new line in your hosts "/etc/fstab"
7.) manually mount it by running
mount -a
...you now should have a working XFS partition mounted at "/mnt/data"...but first verify that it works
8.) on the host, create a new folder on that partition that you want to pass to the LXC so the LXC can use it to store the SMB shares there (for example run
mkdir /mnt/data/omv
)
9.) inside the LXC, create a new folder where you want your folder from the last step bind-mounted to (for example run
mkdir /media/omv
)
10.) on your host edit the LXCs config file (for examlpe
nano /etc/pve/lxc/100.conf
if your LXC would have the VMID 100) and add a new line there to create a bind-mount. Such a line could look like this
mp0: /mnt/data/omv,mp=/media/omv,mountoptions=noatime
and would bind-mount the folder "/mnt/data/omv" on your host" to the folder "/media/omv" inside your LXC.
11.) now comes the most complicated part. Unprivileged LXCs use user and group remapping so users/groups you see inside the LXC with a UID/GID of 0 to 65535 will be using the UID/GID of 100000 to 165535 on th host. Lets say you omv folder is owned by root (UID 0) on the host and you bind-mount into the LXC. Your root inside the LXC can't access that folder because the LXCs root is reported as UID 0 inside the LXC but is actually internally using the UID 100000. So to prevent right problems you got 3 options:
11.a) make the hosts omv folder read/write/executable by everyone (
chmod -R 777 /mnt/data
) which isn't great for security
11.b) change the owner of the hosts omv folder to the mapped UID of the user your OMV is running as inside the LXC (so if your OMV is running as the LXCs root user you make that hosts folder owned by UID/GUI 100000 like this:
chown -R 100000:100000 /mnt/data
)
11.c) you manually edit the user/group remapping like described
here so the user that ownes the folder you want to bind-mount won't be remapped so the UID/GID on the host and inside the LXC would be identical
12.) you now should have a folder "/media/omv" inside your LXC which you can use to store your SMB/NFS shares and so on. Everything written to "/media/omv" inside your LXC will end up on the host in the folder "/mount/data/lxc" which again will be stored on your data disk.
13.) you can then use the OMVs webUI to create your SMB shares, manage rights and so on