Jellyfin LXC & USB bindmount help

Sleve420

New Member
Oct 1, 2022
6
0
1
Ok, I'm sure this has been covered 1000 times, but I'm at a loss and feel like I've tried everything. I'm new to Proxmox, but I'll do my best to give the details:

I'm running Proxmox on an HP 800 G3 mini. I have a VM running Home Assistant and an LXC container running Jellyfin. So far, everything is running with no issues.

I have a 1TB external USB connected to the HP running Proxmox and I'm attempting to pass the media folders to the Jellyfin LXC container.

I have the drive mounted to /media/sdb1 and in the Jellyfin container I can CD into /media/sdb1 but when I check ls it's empty. There are folders in there, but that's as far as Jellyfin or the container can see.

I've attempted adjusting the mapping for the container, it has a mp1: /media/sdb1,mp=/sdb1 in the config. I've tried creating a user and a group with IDs of 2000 and setting permissions and adding the drive to fstab.... Nothing has worked.

Can someone please walk me through this like I was a child? Lol I'll tell you the paths I need and lay them out for me bc I /path/to/mount stuff is fine, but I feel like I'm missing a small mistake somewhere to reach the folders I need
 
Are you using a unprivilged or privileged LXC? With unprivileged LXCs you have to deal with user remapping: https://pve.proxmox.com/wiki/Unprivileged_LXC_containers

By default doing a bind-mount "mp1: /media/sdb1,mp=/sdb1" with a unprivileged LXC would mean that "/media/sdb1" owned by UID/GID 102000 on the host would be bind-mounted to "/sdb1" owned by UID/GID 2000 inside the LXC.
 
Are you using a unprivilged or privileged LXC? With unprivileged LXCs you have to deal with user remapping: https://pve.proxmox.com/wiki/Unprivileged_LXC_containers

By default doing a bind-mount "mp1: /media/sdb1,mp=/sdb1" with a unprivileged LXC would mean that "/media/sdb1" owned by UID/GID 102000 on the host would be bind-mounted to "/sdb1" owned by UID/GID 2000 inside the LXC.
so, I've gotten to the point that root user can CD into /sdb1 and ls to see the folders.....however....I still cannot see them WITHIN jellyfin to select them as media directories. What am I doing wrong?
 

Attachments

  • jellyfin.png
    jellyfin.png
    187.8 KB · Views: 21
So the lxc is showing nobody and the host is showing root
 

Attachments

  • nobody.png
    nobody.png
    269.4 KB · Views: 24
  • root.png
    root.png
    92.8 KB · Views: 22
Thats because of user remapping. You you want that root inside the LXC has rights to access the files inthat bind-mount you have to chown that folder on the host to UID/GID 100000.
 
chown 100000:100000 /sdb1 has no effect same with /media/sdb1


nothing seems to change the Nobody in the lxc. i'm assuming my mappings are all screwed up at this point as well. included are the subuid. subgid and conf

thanks for the help. This has been days of trying just to get to this point
 

Attachments

  • 101conf.png
    101conf.png
    46.9 KB · Views: 11
  • subgid.png
    subgid.png
    13.7 KB · Views: 12
  • subuid.png
    subuid.png
    9.4 KB · Views: 11
chown 100000:100000 /sdb1 will only chown the folder itself, not its content. For that you need to do it recursive: chown -R 100000:100000 /sdb1. And with your remapping you probably want it owned by UID 1000, so it should be owned by UID 1000. chown -R 1000:1000 /sdb1.

And your remapping isn't defining the whole 65535 UIDs/GIDs. The lines...
Code:
lxc.idmap = u 1001 101001 64530
lxc.idmap = g 1001 101001 64530
...should be...
Code:
lxc.idmap = u 1001 101001 64535
lxc.idmap = g 1001 101001 64535
 
ok, so I made the changes to the mappings in the lxc. I ran chown -R 1000:1000 /sdb1 on both pve and the lxc. Still no change. Everything is nobody and although I can CD into all the folders within the jellyfin console...it's still empty when trying to seek the folders in the GUI
 

Attachments

  • jellyfin2.png
    jellyfin2.png
    133.7 KB · Views: 17

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!