== TIMESTAMPS == 0:00 How to attach shared folder to OMV or Plex container 0:23 Open Media Vault settings 2:20 Mounting SMB shared folder on Proxmox 3:15 Installing CIFS utility 5:40 pct command to bind mount folder to container 7:20 Rebooting OpenMediaVault container 7:40 Adding media library folder to OpenMediaVault Please let me know if you have any questions. Marek
Wow finally someone that explains this simple concept in a way that is safe and executable. Everything else I looked up online was either complicated or unsafe. Thank you!!
Happy I could help :) You might be interested in follow up video where we created a script that will automatically mount that location after Proxmox reboot: ruclips.net/video/Hu1fY0-FvVE/видео.html Thanks- Marek
I have spent weeks watching other videos trying to figure this out. The only difference I had is that OMV runs on a separate physical host that I've told ProxMox to connect to and treat as external storage (for VM backups). However, your instructions followed to a tee all still worked. I cannot thank you enough man.
Hi! I am glad you liked it and found it helpful. Yes - regarding bind mounts and volumes - you might also be interested in 2 other videos, one of them I have just released - Bind mounts vs Volumes - what are they? What's the difference between them? : ruclips.net/video/keINzeYs_lc/видео.html and Automatically bind mount NFS/SMB/CIFS share to Proxmox LXC container after reboot with bash script: ruclips.net/video/Hu1fY0-FvVE/видео.html Kind regards marek@automation-avenue.com
@@Automation-Avenue After a full system restart I receive playback errors in JF. cd /mnt/ no longer shows the directories i created. Is there something i am missing?
I've been using Proxmox for a couple of months now, and this video is exactly was I was looking to do! Thanks for sharing (what I would do differently is add the mounting of the OMV share on the fstab file of the proxmox server, so It will mount on every boot) but besides that, this video is extremely helpful! THANKS!
Hi! Thank you for watching and commenting. Regarding mount - you would also have to delay the start of Jellyfin container for that to work but good shout. You might be interested in yet another solution to that problem with bash script - please see my other video which is a follow up to this one: ruclips.net/video/Hu1fY0-FvVE/видео.html
GOD BLESS YOU MAN!!! I literally whooped with glee when this worked for me. This has been plaguing me for days. No other videos explained these concepts as well as you. Thank you!!!
Happy that I could help. I guess that you might also be interested in 2 other videos, one of them I have just released - Bind mounts vs Volumes - what are they? What's the difference between them? : ruclips.net/video/keINzeYs_lc/видео.html and Automatically bind mount NFS/SMB/CIFS share to Proxmox LXC container after reboot with bash script: ruclips.net/video/Hu1fY0-FvVE/видео.html Kind regards Marek
Clear and concise.... no meaning off to unrelated stuff. One thing that was missed though.... when you reboot the proxmox server, you need to enter the smbuser password, once the nas vm has come up. Perhaps a second video to explain how make all of that majicly happen.
@@Automation-Avenue now i have a problem that when i boot proxmox it won't mount on boot, I'v tried fstab and other things but it not mounting on boot, i need to do mount -a every time i reboot. do you know what can i do ? thanks
@@amirbendavid951 yes - quite a few people have reported it - please see my new video with a script that fixes this issue: ruclips.net/video/Hu1fY0-FvVE/видео.html Hope it helps :) Marek
Glad I could help, you might also be interested in follow-up video I created about how to create a bash script that will auto-mount all of that for you upon server reboot: ruclips.net/video/Hu1fY0-FvVE/видео.html Thank you for watching! Marek
Thumbs up...WAY UP!!! I don't know why so many people like to post tutorials that don't work. Clickbait maybe. Anyway, thank you so much for this, for posting something that ACTUALLY works!
thasnk you so much for this video, ive read so much on how to do this on line none of it makes any sence to me lol, but your video is so easy to follow and worked first time so anain thank you
Please also see my new video with a script that makes your VM, container and bind mount up and running after reboot : ruclips.net/video/Hu1fY0-FvVE/видео.html Marek
Nice and easy video explaining a tutorial I followed on a forum. Though question: I configured my ubuntu-samba VM with more storage but the shared mount hasn't updated the amount of storage is available to the VM now. My question is, how can I get this extra storage to be usable for the mounted file?
Great Video, I tried for ages to do this, I second what other people are saying though rebooting proxmox cancels the share anyway to automate the connection
yes - quite a few people have reported the reboot issue - so please see my new video with a script that fixes all of that and can do much more : ruclips.net/video/Hu1fY0-FvVE/видео.html Hope it helps :) Marek
Sure, basically GUI will generate the same CLI command in the background, but knowing CLI command lets you build your next project which is automatic bind after the proxmox server reboots :D : ruclips.net/video/Hu1fY0-FvVE/видео.html Thank you for watching and for commenting :) Marek
i've had issues trying to make the mount (in the unprivileged LCX) read AND writeable. I have a TV tuner connected to my Jellyfin account, and need it to be able to write to it, when I'm recording a show. I still haven't worked it out, so have resorted to using a privileged container, with CIFS installed in it
@@Automation-Avenue hey mate, just to confirm the "-mp0" should be unique and the next shared folder should be "-mp1" -- basically you cannot have 2 -mp0 on two shared folder.. same goes with the "mp=shared"? For example: I cannot have "pct set 203 -mp0 /mnt/minipc,mp=shared" and the next one is "pct set 203 -mp0 /mnt/minipc,mp=shared2" Also, if I decided to unmount or reverse/undo the sharing -- what would be the command for that? thanks in advance.
Hi Marek, great tutorial - especially in combination with your other video with the batch script. This works fine for me with a read-only LXC application. However, I cannot use it with another unprivileged LXC that needs write access on the OMV share, due to missing permissions. Looking at the comments below, there are several people that have the same issue... Maybe you could make a video for a solution how to fix this? Or is it simply not possible with an unprivileged LXC and you need a privileged LXC instead , if you want to have read & write access for data from a OMV share that's bind mounted to a proxmox LXC container ? Thanks a lot !
Yes I noticed multiple questions regarding that particular issue. Its definately doable, I will need to write down all steps required and will record and publish a video so watch that space ;) Thank you for your comment! Marek
Hi This approach will have read access only, but because many people asked how to get slso write access - I will create separate video explaining possible solutions. Thank you for watching and commenting :)
Thank you ! I am working on follow up to that video, thinking about making a script that will automatically start OMV and mount a volume after a reboot, so please watch that space! Thanks for your comment! Marek
Do you have a fix for when you get 'permission denied' when you try to create files/folders in this mounted directory on the container? I'm having this issue and can't figure it out. Thanks!
Hi! Really helpful tutorial! Only one problem with it. What happens when I want to write to that smb share bind? For example, I now see my folders to my audiobookshelf container after I followed your instructions but I cannot upload anything new as I do not have write permissions. Tried in console with mkdir on the mounted folder but the same. Thank you!
Hi! Difficult to say not knowing entire config, but if you can read but cannot write then I would check shared folder user / folder permissions. For me - my sambashare folder has permissions 'drwxrwxr-x' , which means only the same user and user belonging to the same group can write to that directory, and any other user can only read ( and execute ) which is exactly what I need. So you either need to change folder permissions or only write to that folder from user account that has the right to do so. Please also have a look at this link: hostingultraso.com/help/ubuntu/adding-users-samba-server-ubuntu Hope that helps! Kind regards marek@automation-avenue.com
Hi, There is a bit of ID remapping that happens between the host and an LXC container. The UIDs and GIDs are mapped 100,000 above the host. If you look at the files in the container you will notice they are owned by nobody:nobody since the container does not have any reference to the owner or group. This is ok of your application is run as root in the container. But if your app is not able to run as root you have to do something different. Here is what I do. Mind you I use fstab to bind my mount points so they are there after a reboot of the host (Proxmox). You might want to do some UID mapping in the LXC container config file to make things a bit easier inside the container. Include the following in the LXC definition file for your container. A restart is required. # uid map: from uid 0 map 1005 uids (in the ct) to the range starting 100000 (on the host), so 0..1004 (ct) → 100000..101004 (host) lxc.idmap = u 0 100000 1005 lxc.idmap = g 0 100000 1005 When binding the mount include uid=100000,gid=110000,file_mode=0770,dir_mode=0770 to the mount command. This will bind the mount to that UID and GID that get passed in to the container. When the mp is made to the container these get translated to UID=0 and GID=10000. Also, in the container create a group, say lxc_shares that has a GID of 10000 and add the user that runs the application to that group. Now the user the application is running under (1005 in my case) will have both read and write access to the mount point in the unprivileged container. I also have audiobookshelf with the books on a NAS as your example app you suggest. Hope that helps you out.
@@wizzbangtg yes that is correct. I went with a privileged container instead to remove all the fuss about it. Worked with a simple mount and even though it's not considered best practice I'm not too worried about safety.
Running it on bare metal works better, I used to run Plex in an lxc container with a remote nfs mount to truenas and without fail the nfs mount would randomly disconnect. I think it’s something to do with how the lxc container allows nfs mounts, a remount wouldn’t work, only rebooting the container worked. I never had that issue running it on a bare metal server in docker. Even if I temporarily take the truenas server down, it recovers as soon as the server is up.
Hi. If you had an issue then it most likely would be seen on proxmox itself, the containers are pretty 'dumb' about what is going on behind the scene. I honestly never had an issue running Jellyfin and OMV configured exactly as in this video, I haven't played with TrueNAS for a while but remember swapping it for unraid for some reason ( long before they changed the licensing )
@@Automation-Avenue it looks like you were using samba, my issue occurred with the native nfs mounts that are built into the lxc container . Maybe samba is fine, nfs was not for me.
Thank you so much for this guide, it helped me understand a lot ! In my case, instead of OMV VM I have created TurnKey File Server LXC in which I added a mount point for an HDD I have installed in my Proxmox machine. I share the contents of this drive via TurnKey's Samba server. I want these contents to also be available for Jellyfin LXC. Would the instructions in this video work for me?
Yes, with this setup yiu will have read only permissions. Some changes are needed to mount point on proxmox - I will shortly make a video how to sort it out. Thanks for your comment :)
THanks for the tutorial I think i followed it by the letter, but i cannot write to the shared mountpoint from the jellyfin lxc, from the proxmox node i can write. Is this by design or did i miss something?
When OMV restarts, the share becomes unavailable and can make proxmox( and the other LXC that use the share) crash. Better to use autofs. This also works with NFS (faster and less overhead on unix).
Autofs might be one option yes, but please also see my new video with a script that starts your OMV, your container and mounts everything automatically after every restart: ruclips.net/video/Hu1fY0-FvVE/видео.html Marek
Hello, very good video, thank you!!!! In my scenario, I have a Debian LXC container and I would like it to see the folders in Synology. Your entire tutorial worked for me, however, when trying to add the root folder to sonarr or radarr, it doesn't see them. Is there anything else I should have done besides what I did following your video? Thank you again
@@Automation-Avenue You can delay the start of the jellyfin container. In promxmox go to your lxc then Options>Start/Shutdown order and set Startup delay to around 60-80 seconds. Now you can add entry to fstab and everything should work after restart.
@@kamilbaranski854 yes, there is many ways to approach that problem, please see my new video with a script that fixes this issue after restarting Proxmox: ruclips.net/video/Hu1fY0-FvVE/видео.html As with everything in Linux - its just one out of so many other possible solutions :) Marek
This is a very well done tutorial but I have had little success, I mount everything as instructed in the video except using fstab to mount smb on boot, Im able to see my nas contents from host machine, when I pass it to the container I see nothing in my shared folder. Any ideas on what I need to do?
Another update: Making the container privileged completely solved my issue along with using FSTAB to mount (even though I know its not recomended) hopefully this helps some people struggling like myself Thanks for the Awesome video to point me in the right direction!!!
I've done it through the UI of proxmox. Just added smb share to the node (proxmox remembers all of your credentials), then pass through the folder to a vm or ct. But there is a catch. My Jellyfin ct can't start without fully loaded smb shares into the proxmox, and after a power outage or other reboot, it won't start automatically. So I made a simple conditional script (i can share it too) and made it run as a cron job on a host on every reboot. Two years ago when I just started making my own server, I would kill for the info in this video!
@@senj3ru I already sent an email to @Automation-Avenue hoping that the author of this video would add a link to the video description, but apparently my email got lost or hasn't been seen by him yet. Or the video author's automated email system thought I was a spam. It's a shame when you create your literally first project on github and can't share it.
hey nice video my only issue is i cannot add hdd drives to zfs because they are on a pcie sata expander card, i dont know how to see them, i can pass it thru to a vm like truenas and it works i see everything
@@Automation-Avenue yes I see thank you ! I'm use to proxmox being so hard to learn that I was suspicious to see such a simple tutorial, great job, thank you again !
That's the tricky part because the OMV share needs to be available before proxmox can mount it and proxmox has to have it mounted before the Jellyfin container is started.
Yes I do have solution for that - please see my new video with a script that fixes this issue after restarting Proxmox: ruclips.net/video/Hu1fY0-FvVE/видео.html Hope it helps :) Marek
@@killer2600 yes you are right - I made a script that does it automatically after each reboot and made a video - ruclips.net/video/Hu1fY0-FvVE/видео.html Please let me know your thoughts Marek
While indeed this does work and is a solution, I just feel like its a bit messy to passthrough drives (or controllers) to OMV just to mount the shared back to Proxmox via SMB and pass it to a LXC. I just feel like the Proxmox host should have minimal configurations that are related to guest Vms or LXCs, so that you have no dependencies to the host when you eventually want to restore. the whole system. Of course this is a minor change but they add up. Its too bad that LXCs have this limitation and you cand mount SMB shares to it.
Hi! True- but please see a follow up video where we solve this problem by creating a bash script that will auto-mount everything after Proxmox reboot: ruclips.net/video/Hu1fY0-FvVE/видео.html Hope that helps and thank you for your comment ! Marek
Here’s a problem I’ve had for months. I have proxmox running truenas and Portainer which then has jellyfin, sonarr and radarr. I’ve struggled since March trying to make this work. I’m going to try your solution and see if that works. Or if anyone else has done this, let me know!
@@Automation-Avenue well, had to scratch my head a little when I got errors (containers running trying to change mount point) and then mounting to a location I couldn’t find, it’s now working! Excellent
@@Automation-Avenue So a little update. While your method worked for me to get Jellyfin to see the files, my arrstack running in the same container state they do not have write access for user 'abc' so I'm still stuck Any ideas?
@@wvziccardi It is a nature of unprivileged container. You can find more info in the wiki of Proxmox--> unprivileged container. Your mounted folder is owned by nobody/nogroup with no rights.
Спасибо мужик! У меня всё получилось, благодаря тебе я понял как пробрасывать папки в свой plex сервер mkdir /mnt/pve/plex mount -t cifs -o user={user} //server/folder /mnt/pve/plex/ pct set {id} -mp{id} /mnt/pve/plex/,mp=/mnt
== TIMESTAMPS ==
0:00 How to attach shared folder to OMV or Plex container
0:23 Open Media Vault settings
2:20 Mounting SMB shared folder on Proxmox
3:15 Installing CIFS utility
5:40 pct command to bind mount folder to container
7:20 Rebooting OpenMediaVault container
7:40 Adding media library folder to OpenMediaVault
Please let me know if you have any questions.
Marek
Wow finally someone that explains this simple concept in a way that is safe and executable. Everything else I looked up online was either complicated or unsafe. Thank you!!
Happy I could help :)
You might be interested in follow up video where we created a script that will automatically mount that location after Proxmox reboot:
ruclips.net/video/Hu1fY0-FvVE/видео.html
Thanks- Marek
I've been banging my head against the wall for hours now. I just found your video, and you've saved me a lot of time. Thank you sir
You're welcome! Thank you for watching.
Marek
I have spent weeks watching other videos trying to figure this out. The only difference I had is that OMV runs on a separate physical host that I've told ProxMox to connect to and treat as external storage (for VM backups). However, your instructions followed to a tee all still worked. I cannot thank you enough man.
Hi! I am glad you liked it and found it helpful.
Yes - regarding bind mounts and volumes - you might also be interested in 2 other videos, one of them I have just released -
Bind mounts vs Volumes - what are they? What's the difference between them? :
ruclips.net/video/keINzeYs_lc/видео.html
and
Automatically bind mount NFS/SMB/CIFS share to Proxmox LXC container after reboot with bash script:
ruclips.net/video/Hu1fY0-FvVE/видео.html
Kind regards
marek@automation-avenue.com
Just what I was looking for. No BS and with steps explained.
Thank you for watching and commenting :)
Marek
I was dreaming of this issue I had in my setup yesterday and RUclips led me here. This is perfect, thank you!!
You're so welcome! Thank you for watching
All the other tutorials skip over this issue... Thanks for your efforts
You are most welcome
I think I want to have your babies - so many tutorials on this subject, but this one is quick, clear, and straightforward. More please!
:D - Glad I could help, thank you for your comment.
Marek
@@Automation-Avenue After a full system restart I receive playback errors in JF. cd /mnt/ no longer shows the directories i created. Is there something i am missing?
@@BrentH561 Hi - please see this video where I created script to auto-mount folders after reboot:
ruclips.net/video/Hu1fY0-FvVE/видео.html
Thank you so much for sharing this tutorial! This is the only method that worked for me to mount a truenas core smb share to my jellyfin lxc (unpriv).
You're welcome! Thank you for watching.
Marek
same here my friend,, this is the simplest method i tried... and success...
I've been using Proxmox for a couple of months now, and this video is exactly was I was looking to do! Thanks for sharing (what I would do differently is add the mounting of the OMV share on the fstab file of the proxmox server, so It will mount on every boot) but besides that, this video is extremely helpful! THANKS!
Hi! Thank you for watching and commenting.
Regarding mount - you would also have to delay the start of Jellyfin container for that to work but good shout.
You might be interested in yet another solution to that problem with bash script - please see my other video which is a follow up to this one:
ruclips.net/video/Hu1fY0-FvVE/видео.html
GOD BLESS YOU MAN!!! I literally whooped with glee when this worked for me. This has been plaguing me for days. No other videos explained these concepts as well as you. Thank you!!!
Happy that I could help.
I guess that you might also be interested in 2 other videos, one of them I have just released -
Bind mounts vs Volumes - what are they? What's the difference between them? :
ruclips.net/video/keINzeYs_lc/видео.html
and
Automatically bind mount NFS/SMB/CIFS share to Proxmox LXC container after reboot with bash script:
ruclips.net/video/Hu1fY0-FvVE/видео.html
Kind regards
Marek
Clear and concise.... no meaning off to unrelated stuff.
One thing that was missed though.... when you reboot the proxmox server, you need to enter the smbuser password, once the nas vm has come up.
Perhaps a second video to explain how make all of that majicly happen.
As per your request:
ruclips.net/video/Hu1fY0-FvVE/видео.html
Hope it helps :)
Marek
you don't know how much i tried to find a solution for this. i can't believe it so simple. thank you . subscribed .
Glad that I could help ! Thank you!
@@Automation-Avenue now i have a problem that when i boot proxmox it won't mount on boot, I'v tried fstab and other things but it not mounting on boot, i need to do mount -a every time i reboot. do you know what can i do ? thanks
@@amirbendavid951 yes - quite a few people have reported it - please see my new video with a script that fixes this issue:
ruclips.net/video/Hu1fY0-FvVE/видео.html
Hope it helps :)
Marek
Many thanks bro. You saved me many hours of my live
Glad I could help !
Marek
Have to say best video by far, Simple, Perfectly explained! Deserved a new sub and like!
Thank you !
Thank you so much! I have been scratching my head trying to figure this setup out and how to connect it through proxmox to see the shared files.
Glad I could help! Cheers! Marek
Thank you so much for this saved me hours of stress wish i had found your video sooner!
Glad I could help, you might also be interested in follow-up video I created about how to create a bash script that will auto-mount all of that for you upon server reboot:
ruclips.net/video/Hu1fY0-FvVE/видео.html
Thank you for watching!
Marek
Thumbs up...WAY UP!!! I don't know why so many people like to post tutorials that don't work. Clickbait maybe. Anyway, thank you so much for this, for posting something that ACTUALLY works!
You are welcome! Thank you for watching :) Marek
thasnk you so much for this video, ive read so much on how to do this on line none of it makes any sence to me lol, but your video is so easy to follow and worked first time so anain thank you
Glad I could help! Thank you !
Please also see my new video with a script that makes your VM, container and bind mount up and running after reboot :
ruclips.net/video/Hu1fY0-FvVE/видео.html
Marek
Nice and easy video explaining a tutorial I followed on a forum. Though question: I configured my ubuntu-samba VM with more storage but the shared mount hasn't updated the amount of storage is available to the VM now. My question is, how can I get this extra storage to be usable for the mounted file?
neat routine, thank you! Subscribed.
Awesome! Thank you for subscribing !
Thank you so much
You're most welcome!
Great Video, I tried for ages to do this, I second what other people are saying though rebooting proxmox cancels the share anyway to automate the connection
yes - quite a few people have reported the reboot issue - so please see my new video with a script that fixes all of that and can do much more :
ruclips.net/video/Hu1fY0-FvVE/видео.html
Hope it helps :)
Marek
You can set mounts via the GUI at the data centre level in storage.
Sure, basically GUI will generate the same CLI command in the background, but knowing CLI command lets you build your next project which is automatic bind after the proxmox server reboots :D :
ruclips.net/video/Hu1fY0-FvVE/видео.html
Thank you for watching and for commenting :)
Marek
i've had issues trying to make the mount (in the unprivileged LCX) read AND writeable. I have a TV tuner connected to my Jellyfin account, and need it to be able to write to it, when I'm recording a show. I still haven't worked it out, so have resorted to using a privileged container, with CIFS installed in it
That was a really great tutorial. As what other said, It is clear and conceise. I have smash the SUBSCRIBE button for you, my friend.
Awesome! Thank you for your support!
@@Automation-Avenue hey mate, just to confirm the "-mp0" should be unique and the next shared folder should be "-mp1" -- basically you cannot have 2 -mp0 on two shared folder.. same goes with the "mp=shared"?
For example: I cannot have "pct set 203 -mp0 /mnt/minipc,mp=shared" and the next one is "pct set 203 -mp0 /mnt/minipc,mp=shared2"
Also, if I decided to unmount or reverse/undo the sharing -- what would be the command for that? thanks in advance.
excellent!! 👌🏽thank's
My pleasure! Thank you for watching :)
Hi Marek, great tutorial - especially in combination with your other video with the batch script.
This works fine for me with a read-only LXC application. However, I cannot use it with another unprivileged LXC that needs write access on the OMV share, due to missing permissions. Looking at the comments below, there are several people that have the same issue... Maybe you could make a video for a solution how to fix this?
Or is it simply not possible with an unprivileged LXC and you need a privileged LXC instead , if you want to have read & write access for data from a OMV share that's bind mounted to a proxmox LXC container ?
Thanks a lot !
Yes I noticed multiple questions regarding that particular issue.
Its definately doable, I will need to write down all steps required and will record and publish a video so watch that space ;)
Thank you for your comment!
Marek
Does this method only provide read access? I'm able to mount using both nfs and smb using the storage option but its strictly read access
Hi
This approach will have read access only, but because many people asked how to get slso write access - I will create separate video explaining possible solutions.
Thank you for watching and commenting :)
Great tutorial, if I could give 10 thumbs-up I would have done it! TYVM!
Thank you ! I am working on follow up to that video, thinking about making a script that will automatically start OMV and mount a volume after a reboot, so please watch that space!
Thanks for your comment!
Marek
Do you have a fix for when you get 'permission denied' when you try to create files/folders in this mounted directory on the container? I'm having this issue and can't figure it out. Thanks!
I will make a video how to write to files and create folders, it requires just some small changes to existing config.
Thanks for watching :)
Hi! Really helpful tutorial! Only one problem with it. What happens when I want to write to that smb share bind?
For example, I now see my folders to my audiobookshelf container after I followed your instructions but I cannot upload anything new as I do not have write permissions.
Tried in console with mkdir on the mounted folder but the same.
Thank you!
Hi! Difficult to say not knowing entire config, but if you can read but cannot write then I would check shared folder user / folder permissions.
For me - my sambashare folder has permissions 'drwxrwxr-x' , which means only the same user and user belonging to the same group can write to that directory, and any other user can only read ( and execute ) which is exactly what I need. So you either need to change folder permissions or only write to that folder from user account that has the right to do so. Please also have a look at this link: hostingultraso.com/help/ubuntu/adding-users-samba-server-ubuntu
Hope that helps!
Kind regards
marek@automation-avenue.com
Hi,
There is a bit of ID remapping that happens between the host and an LXC container. The UIDs and GIDs are mapped 100,000 above the host. If you look at the files in the container you will notice they are owned by nobody:nobody since the container does not have any reference to the owner or group. This is ok of your application is run as root in the container. But if your app is not able to run as root you have to do something different.
Here is what I do. Mind you I use fstab to bind my mount points so they are there after a reboot of the host (Proxmox).
You might want to do some UID mapping in the LXC container config file to make things a bit easier inside the container.
Include the following in the LXC definition file for your container. A restart is required.
# uid map: from uid 0 map 1005 uids (in the ct) to the range starting 100000 (on the host), so 0..1004 (ct) → 100000..101004 (host)
lxc.idmap = u 0 100000 1005
lxc.idmap = g 0 100000 1005
When binding the mount include uid=100000,gid=110000,file_mode=0770,dir_mode=0770 to the mount command. This will bind the mount to that UID and GID that get passed in to the container. When the mp is made to the container these get translated to UID=0 and GID=10000.
Also, in the container create a group, say lxc_shares that has a GID of 10000 and add the user that runs the application to that group.
Now the user the application is running under (1005 in my case) will have both read and write access to the mount point in the unprivileged container.
I also have audiobookshelf with the books on a NAS as your example app you suggest.
Hope that helps you out.
@@wizzbangtg yes that is correct. I went with a privileged container instead to remove all the fuss about it.
Worked with a simple mount and even though it's not considered best practice I'm not too worried about safety.
I think you can do this instead: OMV> Jellfin
in Jellyfin container = apt-get install cifs-utils then mount that folder from OMV
am I right?
Running it on bare metal works better, I used to run Plex in an lxc container with a remote nfs mount to truenas and without fail the nfs mount would randomly disconnect. I think it’s something to do with how the lxc container allows nfs mounts, a remount wouldn’t work, only rebooting the container worked.
I never had that issue running it on a bare metal server in docker. Even if I temporarily take the truenas server down, it recovers as soon as the server is up.
Hi. If you had an issue then it most likely would be seen on proxmox itself, the containers are pretty 'dumb' about what is going on behind the scene.
I honestly never had an issue running Jellyfin and OMV configured exactly as in this video, I haven't played with TrueNAS for a while but remember swapping it for unraid for some reason ( long before they changed the licensing )
@@Automation-Avenue it looks like you were using samba, my issue occurred with the native nfs mounts that are built into the lxc container .
Maybe samba is fine, nfs was not for me.
Thank you so much for this guide, it helped me understand a lot ! In my case, instead of OMV VM I have created TurnKey File Server LXC in which I added a mount point for an HDD I have installed in my Proxmox machine. I share the contents of this drive via TurnKey's Samba server. I want these contents to also be available for Jellyfin LXC. Would the instructions in this video work for me?
How can i create a folder in the mount point on the proxmox CT? I get the error message "mkdir: cannot create directory 'test': Permission denied"
Yes, with this setup yiu will have read only permissions. Some changes are needed to mount point on proxmox - I will shortly make a video how to sort it out.
Thanks for your comment :)
THanks for the tutorial
I think i followed it by the letter, but i cannot write to the shared mountpoint from the jellyfin lxc, from the proxmox node i can write. Is this by design or did i miss something?
When OMV restarts, the share becomes unavailable and can make proxmox( and the other LXC that use the share) crash.
Better to use autofs.
This also works with NFS (faster and less overhead on unix).
Autofs might be one option yes, but please also see my new video with a script that starts your OMV, your container and mounts everything automatically after every restart:
ruclips.net/video/Hu1fY0-FvVE/видео.html
Marek
Hello, very good video, thank you!!!! In my scenario, I have a Debian LXC container and I would like it to see the folders in Synology. Your entire tutorial worked for me, however, when trying to add the root folder to sonarr or radarr, it doesn't see them. Is there anything else I should have done besides what I did following your video? Thank you again
good and clear instruction thanks, one question, what is the best practice so that the share is automatically remounted after restarting proxmox?
Please see my new video with a script that fixes this issue after restarting Proxmox:
ruclips.net/video/Hu1fY0-FvVE/видео.html
Hope it helps :)
Marek
@@Automation-Avenue You can delay the start of the jellyfin container. In promxmox go to your lxc then Options>Start/Shutdown order and set Startup delay to around 60-80 seconds. Now you can add entry to fstab and everything should work after restart.
@@kamilbaranski854 yes, there is many ways to approach that problem, please see my new video with a script that fixes this issue after restarting Proxmox:
ruclips.net/video/Hu1fY0-FvVE/видео.html
As with everything in Linux - its just one out of so many other possible solutions :)
Marek
This is a very well done tutorial but I have had little success, I mount everything as instructed in the video except using fstab to mount smb on boot, Im able to see my nas contents from host machine, when I pass it to the container I see nothing in my shared folder. Any ideas on what I need to do?
Small Update: I tried to mount my nas via the method shown in the video and I cannot see the content of my NAS anymore
Another update: Making the container privileged completely solved my issue along with using FSTAB to mount (even though I know its not recomended)
hopefully this helps some people struggling like myself
Thanks for the Awesome video to point me in the right direction!!!
Thank you! Glad I could help.
Marek
I've done it through the UI of proxmox. Just added smb share to the node (proxmox remembers all of your credentials), then pass through the folder to a vm or ct. But there is a catch. My Jellyfin ct can't start without fully loaded smb shares into the proxmox, and after a power outage or other reboot, it won't start automatically. So I made a simple conditional script (i can share it too) and made it run as a cron job on a host on every reboot. Two years ago when I just started making my own server, I would kill for the info in this video!
Please see my new video with a script that fixes this issue after restarting Proxmox:
ruclips.net/video/Hu1fY0-FvVE/видео.html
Hope it helps :)
Marek
can please share with this script?
@@senj3ru I want to, but I can't. Posted it on my github, but I can't share the link in the comments. The automatic system deletes them.
@@senj3ru I already sent an email to @Automation-Avenue hoping that the author of this video would add a link to the video description, but apparently my email got lost or hasn't been seen by him yet. Or the video author's automated email system thought I was a spam. It's a shame when you create your literally first project on github and can't share it.
@@goldmax1412Can't you just share your GitHub domain name?
hey nice video my only issue is i cannot add hdd drives to zfs because they are on a pcie sata expander card, i dont know how to see them, i can pass it thru to a vm like truenas and it works i see everything
Does that means that the files are stored several times ? That can be an issue if you have a big library no ? Or did I not understand
Hi. The files are only kept on NAS, then on proxmox and the container we create kinda 'pointers' towards that file location.
Hope that makes sense :)
@@Automation-Avenue yes I see thank you ! I'm use to proxmox being so hard to learn that I was suspicious to see such a simple tutorial, great job, thank you again !
Works wonderfully, but the release/mount point disappears after restarting the system. Do you have a solution to make it persistent?
That's the tricky part because the OMV share needs to be available before proxmox can mount it and proxmox has to have it mounted before the Jellyfin container is started.
Yes I do have solution for that - please see my new video with a script that fixes this issue after restarting Proxmox:
ruclips.net/video/Hu1fY0-FvVE/видео.html
Hope it helps :)
Marek
@@killer2600 yes you are right - I made a script that does it automatically after each reboot and made a video -
ruclips.net/video/Hu1fY0-FvVE/видео.html
Please let me know your thoughts
Marek
While indeed this does work and is a solution, I just feel like its a bit messy to passthrough drives (or controllers) to OMV just to mount the shared back to Proxmox via SMB and pass it to a LXC. I just feel like the Proxmox host should have minimal configurations that are related to guest Vms or LXCs, so that you have no dependencies to the host when you eventually want to restore. the whole system. Of course this is a minor change but they add up. Its too bad that LXCs have this limitation and you cand mount SMB shares to it.
How does it works with NFS share?
It's good dear creator but, if you restarting the Proxmox, you will be lost everything. This is the problem.
Hi! True- but please see a follow up video where we solve this problem by creating a bash script that will auto-mount everything after Proxmox reboot:
ruclips.net/video/Hu1fY0-FvVE/видео.html
Hope that helps and thank you for your comment !
Marek
Here’s a problem I’ve had for months. I have proxmox running truenas and Portainer which then has jellyfin, sonarr and radarr. I’ve struggled since March trying to make this work. I’m going to try your solution and see if that works. Or if anyone else has done this, let me know!
Yes, please let me know how it went.
Thank you for watching and commenting :)
Marek
@@Automation-Avenue well, had to scratch my head a little when I got errors (containers running trying to change mount point) and then mounting to a location I couldn’t find, it’s now working! Excellent
@@Automation-Avenue So a little update. While your method worked for me to get Jellyfin to see the files, my arrstack running in the same container state they do not have write access for user 'abc' so I'm still stuck Any ideas?
@@wvziccardi It is a nature of unprivileged container. You can find more info in the wiki of Proxmox--> unprivileged container. Your mounted folder is owned by nobody/nogroup with no rights.
Спасибо мужик! У меня всё получилось, благодаря тебе я понял как пробрасывать папки в свой plex сервер
mkdir /mnt/pve/plex
mount -t cifs -o user={user} //server/folder /mnt/pve/plex/
pct set {id} -mp{id} /mnt/pve/plex/,mp=/mnt
Glad I could help !