Accessing Internal SSD

mooncake

New Member
Feb 6, 2023
4
0
1
Hi all,

(Disclaimer: I'm a noob, so some terminologies I've used may not be accurate, please be easy)

I have a USFF pc with Proxmox installed on the internal NVMe drive (1TB). Also installed in the computer is an internal SSD (Samsung EVO 860 4TB). With the intention to run this as a media server.

What I've done thus far is installed Plex as a privileged container 100 (via tteck's script) and spun up an Ubuntu VM 101 running an *arr stack as a Docker stack (via dockstarter). They all installed fine.

I intend to store all media files onto the 4TB SSD. So, I added the drive as a Directory under Datacenter > Storage as shown:
Screenshot 2023-02-06 at 1.38.48 pm.png

And Initialized the drive with ext4 file system in pve > DIsks as shown:
Screenshot 2023-02-06 at 1.39.40 pm.png

For the Plex container 100, I mounted the drive through /etc/pve/lxc/100.conf by adding mp0: /mnt/pve/store4,mp=/storage/media. This showed up fine in the console and in Plex.

Over on the Ubuntu VM 101, I mounted the drive through /etc/fstab by adding the line /dev/disk/by-uuid/<SNIP> /mnt/storage ext4 defaults 0 1. This showed up fine in the *arr stack.

This was where my issues began:
During configuration of the apps on the VM, I was unable to access directories in /mnt/storage within the apps. I SSH'ed into the VM to change the owner and group of the directories to that of the logged in user. This change allowed the apps to access the directories with no issues.

Over on the Plex however, I was unable to view the directories in /storage/media. A reboot later, I was able to view them. This pattern kept occurring, of having to reboot the container in order to view the directories that were created on the SSD via the VM.

When a show was added to one of my media apps, and later stored on the SSD, I was unable to view that in Plex.

What am I doing wrong here? Is there a better way to mount/configure the internal SSD?

(I have a feeling that running Plex in the VM would solve my issues, but I am trying to dedicate CPU cores for Plex.)

Thank you.
 
you can't share physical disk between host/ct and VM.
you need network shared folder, samba, nfs, sshfs

Thanks, will that be spinning up openmediavault in a lxc, adding and sharing that disk, and mounting it as a cifs/nfs drive on the VM and CT?
 
Over on the Ubuntu VM 101, I mounted the drive through /etc/fstab by adding the line /dev/disk/by-uuid/<SNIP> /mnt/storage ext4 defaults 0 1. This showed up fine in the *arr stack.
If I understand you right, then you are mounting the same partition on the PVE host and VM? That will corrupt your data. Or didn't you use disk passthrough to get that partition into the VM?

Thanks, will that be spinning up openmediavault in a lxc, adding and sharing that disk, and mounting it as a cifs/nfs drive on the VM and CT?
OMV as a LXC might not work. I did that once but later other people tried that but it wasn't working anymore, because they couldn't use a bind-mounted directory in OMV as a storage. But maybe that is fixed now with OMV6. With OMV5 you needed to install OMV plugin first to use a folder as a storage.
 
Last edited:
If I understand you right, then you are mounting the same partition on the PVE host and VM? That will corrupt your data. Or didn't you use disk passthrough to get that partition into the VM?
I think I was, I did experience data corruption but thankfully I was in the testing phase and nothing major happened. And to be honest, I've gotten to the point where I've looked at many guides, and had to re set up multiple times that I honestly can't tell if I set up disk passthrough.

OMV as a LXC might not work. I did that once but other later people tried that but it wasn't working anymore, because they couldn't use a bind-mounted directory in OMV as a storage. But maybe that is fixed now with OMV6. With OMV5 you needed to install OMV plugin first to use a folder as a storage.
I just tried this and can say that it doesn't work. Or at least it didn't for me. Trying to get OMV to detect my disk was futile.

I might just have to spin up a separate vm to be a dedicated nfs server.
 
I just tried this and can say that it doesn't work. Or at least it didn't for me. Trying to get OMV to detect my disk was futile.
You need to bind-mount the folder from host to LXC and then install and use the "sharerootfs" plugin.
I might just have to spin up a separate vm to be a dedicated nfs server.
But then keep in mind that you can't mount a NFS/SMB share in a unprivileged LXC. That is only possible when using the less secure privileged LXCs.
Workaround would be to mount the NFS/SMB share of the OMV VM on your host and then bind-mount that shares mountpoint into a unprivileged LXC.
But this is very annoying because of the hassle with the user-remapping and also harder to restore a backup or to do a migration, as the restored LXC won't be able to run before setting up user-remapping and NFS/SMB mounts on the new host.
 
Last edited:
You need to bind-mount the folder from host to LXC and then install and use the "sharerootfs" plugin.
I've added a bind mount point, lxblk in the ct's console shows my drive.
Plugin was installed but am still getting the error. Posted my issue on the OMV forums, and am awaiting responses.

Workaround would be to mount the NFS/SMB share of the OMV VM on your host and then bind-mount that shares mountpoint
I might go down the route of having an NFS server on dedicated VM.
Would you know if this would work: individually bind mounting the NFS/SMB share for both the VM with my docker stack + Plex in a privileged LXC?

Thanks!
 
Would you know if this would work: individually bind mounting the NFS/SMB share for both the VM with my docker stack + Plex in a privileged LXC?
That should work, but then I wouldn't port-forward the Plex LXC in your router, as the Plex LXC will be running as the root user.
 
  • Like
Reactions: mooncake