Adding existing hdd´s with media to a plex lxc.

dtd

New Member
Aug 6, 2022
5
0
1
Hi all,

I am fairly new to proxmox, but have set up a small cluster with a couple of vm´s and lxc´s. All of this is installed on a old computer that I use as a server. This computer has 7 disks installed (some are ssds, and some are hdds). 6 of these were used as storage in an ubuntu enviornoment before I decided to switch over to proxmox to try it out. One of these is the disk proxmox is installed on, and was wiped and formatted by the proxmox installer.

All of these do show up under my cluster -> disks, but so far I have not touched these at all. Below is a screenshot, sdb is the one disk that is used for proxmox.

1659946560618.png

So to my question: In my cluster I have set up a plex server in an LXC (ubuntu), I have set up this container with only 8gb of storage. I belive that the plex server itself is set up correctly, since I can se it on my network and connect to it, but for now I have no media attached. The 6 disks that I mention above, have mostly movies and shows on them, my question is, how do I add these so that the plex LXC can see them and I can add media folders from these? Prefferably I would like NOT to wipe/format them, but if I have to, I can probably shuffle the content around and format 1 by one.
 
You can mount a partition on a directory on the Proxmox host, just like you would with Ubuntu or other Linux. Use a place like /srv/movies for the mount and edit /etc/fstab to make it permanent. You can then use mount points to access the directory in the container. Note that you might have to fix file owners and permissions using chown and chmod on the Proxmox host for those files.
There are several posts on this forum about accessing files on (external) drives from inside a container.
 
Thanks, I did try exactly what you described earlier but could not get it to work... I did mount the disk to a location, and then tried a mount point, however the folder in the lxc was empty... Mind that I did create the mount point with the web gui. After some time I did find a yt video explaining this, and when I did this via the command line, instead of the gui all the files appeared and it seems to work fine :D The only thing I need to fix now is to edit the fstab to make it permanent.
 
In case of unprivileged LXCs you also need keep the user remapping in mind. UIDs/GIDs inside the LXC are not the same as on the host. So a folder/file owned by UID/GID 1000 on the host won't be accessible by UID/GID 1000 inside the LXCs in case you don't use chmod 777 so that everyone gets full access.
See here for bind-mounts with user remapping: https://pve.proxmox.com/wiki/Unprivileged_LXC_containers
 
Thanks for your input, I set all of them to 777, since its only movies and series, so now worries.
I have another question though...

I have mounted my disks to /plex/diskName1, /plex/diskName2 etc. When adding a mount point to my lxc container I first tried to add the whole /plex folder, opening the mount point, I found the folder with diskName1, diskName2 etc but all the folders were empty. However, if I mounted plex/diskName1/Movies the files appeared, is it not possible to add the whole /plex folder from my host?
 

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!