Passing Storage to a Container Getting Started with Proxmox 8

Поділитися
Вставка
  • Опубліковано 18 лис 2024

КОМЕНТАРІ • 63

  • @RomanTruman
    @RomanTruman Рік тому +4

    Here we go. Since Proxmox is not support this kind of mount in GUI yet, your explanation here is a brilliant! This approach much efficient than network sharing between VMs/CTs. Thank you very much, wish you all the best!

  • @bomblaster42
    @bomblaster42 Рік тому +6

    Gotta tell ya I've been wrestling with this on and off for months now. This video was the breakthrough I needed. My only regret is that the like button only has one thumb up! Thank you!

  • @rauleduardosantiestebanmor6928
    @rauleduardosantiestebanmor6928 10 місяців тому +2

    I have to say that after a whole afternoon reading the documentation and messing up my host I had so many configs tested that nothing was working for me, your explanation brought me back to my senses!!! Thanks, you just gained a sub!

  • @BeachChimp
    @BeachChimp 8 місяців тому +1

    This was exactly what I was looking for. Great information! Now I have a great setup with my old drives. :)

  • @jSirBrickzAlot
    @jSirBrickzAlot 9 місяців тому +1

    Like how you're showing more advanced stuff in Proxmox, subbed.

    • @virtualizeeverything
      @virtualizeeverything  9 місяців тому

      Thanks for the sub! I try to mix some advanced stuff in and it has been doing better so you will see more

  • @pittgikera
    @pittgikera 6 місяців тому +1

    I was on the brink of giving up on Promox until I watched this. This video should be part of the Wiki.
    Thank you so much. Now I can setup my homelab :)

    • @virtualizeeverything
      @virtualizeeverything  6 місяців тому

      Thank you for the support and the comment if you find something that you thick i could do better or something that i have not covered please leave a comment letting me know

  • @realifejon
    @realifejon 4 місяці тому +1

    Yes man!!!! Thank you so much!!!! This literally fixed all my issues - can't thank you enough!!! I also migrated from TrueNAS and this should be way easier than it currently is. Thank you so much again!!!

  • @kirksteinklauber260
    @kirksteinklauber260 8 місяців тому +1

    AWESOME Video!!! Thanks!!! It worked for me and the explanations where easy to follow

  • @rvkasper
    @rvkasper 9 місяців тому +1

    OMG thank you so much for explaining the bind mount stuff - now I can have an unprivileged lxc

  • @chrisramos3081
    @chrisramos3081 6 місяців тому

    Best explanation I could find regarding this, Thank you!!!!!

    • @virtualizeeverything
      @virtualizeeverything  6 місяців тому

      it was really hard to find info when i was making this video to glad it has help you.

  • @noblesknight8942
    @noblesknight8942 3 місяці тому

    Exactly what I was looking for! Thank you.

  • @piotrlisiecki1936
    @piotrlisiecki1936 Рік тому +2

    Great Video. Thx for that. I just spent 4 day to figure it out going through numerous tutorials. But non of them covered this subject fully as you have done it. One bit is missing as you have said is you didn't show how to mount the USB drive via fstab so it would be visible and usable after the reboot. I will have to look for that solution as i have turnkey fileserver on my little proxmox box with USB storage connected to it where i have my files.
    But again. Thanks for this tutorial as it is the best as i have seen on the net and covers every aspect of bind mounting.

  • @gluetubeserver
    @gluetubeserver 10 місяців тому +13

    Isn't it called 'Bind Mount'?

    • @real_zib
      @real_zib 7 місяців тому

      As it’s called in the video @00:05 😂

  •  Рік тому +2

    Exactly what I needed, thanks!

  • @warrenbradley4962
    @warrenbradley4962 Рік тому +4

    do you have to change the user on the lxc to 1005 or am I missing something?

  • @demiantah3179
    @demiantah3179 Місяць тому

    Brilliant, I can put my HDD and mount my music files, thanksss!

  • @anamixnetwork8446
    @anamixnetwork8446 5 місяців тому

    Many thanks for the video, In my case host directory was a OMV SMB share. So I couldn't chmod and change it right away. Instead had to remount it with 1005:1005 😂

    • @virtualizeeverything
      @virtualizeeverything  5 місяців тому

      Glad this video helped you get you project up and running

    • @lidoror
      @lidoror Місяць тому

      how did you readd the cifs share with the correct id?
      i normal linux you do it in fstab but in here all the configuration happened in the storage.cnf
      what is the right way to do it?

    • @anamixnetwork8446
      @anamixnetwork8446 Місяць тому

      @@lidoror In my case, the CIFS drive is also created with a VM (OMV) running on the PVE host, which I wanted to connect to one of my LXC containers So what I did was the following
      1. Create a Folder at PVE HOST, and mount the CIFS drive there.
      ///ns-folder /mnt/ns/folder cifs credentials=/mnt/ovm/.creds,vers=3.0,uid=1005,gid=1005 0 0
      2. Then I follow this video to make a bind mount of my /mnt/ns/folder into the LXC container.
      I referred to this video and the document. Used the configuration as it is. (Link is there in the video description ☝)
      Finally, execute the following command
      chown -R 1005:1005 /mnt/bindmounts/shared
      Then you will able to write to the share within LXC. 👌

    • @lidoror
      @lidoror Місяць тому

      @@anamixnetwork8446 did you map it in the fstab?
      Because in the proxmoz web ui you can’t change the id

  • @balsalmalberto8086
    @balsalmalberto8086 8 місяців тому +1

    what is the significance of 1005? I can see and edit files from the samba sevrver (turnkey fileshare) now but on the client side it's can't be read, the test.txt inside the folder is unknown file type what else is needed to have the drive accessible for samba share. I would also like to share the same drive with a media server, and others like file backup. the drive I'm sharing is ext4 filesystem
    Update: I figured it out, just as I thought. 1005 is userid and groupid you need to use, in my case it doesn't exist, the guide is not clear about that. I needed to use 1000. I swapped 1005 for 1000 and now I can read and write on the samba client side.

  • @MohamedSaleh01
    @MohamedSaleh01 2 місяці тому

    Thank you!!!!

  • @0x0081
    @0x0081 10 місяців тому +1

    I wonder if setting the container as privileged will help skipping the whole permissions process?

  • @benediktwichmann5294
    @benediktwichmann5294 9 місяців тому +1

    Nice Video👍Got some trouble setting this up, but now it works more or less. I use it to connect a NFS from my NAS to a container, but to get it going I needed to add nfsvers=4 to the mount command. After that it works but it tells me "mount: bad usage". Any idea what im doing wrong?

    • @virtualizeeverything
      @virtualizeeverything  9 місяців тому

      I am sorry I don't :( this post might help forum.proxmox.com/threads/tutorial-mounting-nfs-share-to-an-unprivileged-lxc.138506/ you could also mount the NFS to Proxmox and pass it in by falling the video

  • @RoozenB
    @RoozenB Місяць тому

    14:50 why does this work? Because 1005 is not a valid GID if I look at: cat /etc/group, am I missing something?

  • @bigpoppa9778
    @bigpoppa9778 2 місяці тому

    Good lord I get all the way the the end and everything was fine then see your mounting a USB I can’t figure out that last command but for a network drive

  • @TheDropForged
    @TheDropForged 7 місяців тому

    So I tried this with my external HDD which already had NTFS partition but didn't work. Maybe it won't work with NTFS? But the main problem is that I locked myself out of the container. My root login won't work anymore. Any help please?

  • @europa7533
    @europa7533 Рік тому

    appreciate the video thank you. If I wanted to share that Storage on the container, over the network, is there some way I could do that ?

  • @eriksalo5550
    @eriksalo5550 11 місяців тому +1

    This worked for me until I got to the point of changing the owner to 1005. I was not able to execute "chown -R 1005:1005 /path/path. I am using a TrueNAS NFS share and the solution was to go into the TrueNAS NFS share settings and set "Maproot User" to "root"

  • @petermarin
    @petermarin Рік тому

    Can I use the web interface to mount a NAS smb into a container (e.g. for media files to be accessible inside the container/ for the container to save into the NAS)?

    • @virtualizeeverything
      @virtualizeeverything  Рік тому +1

      As of the last time that I tried no. if you are using smb why not just mount in the lxc?

    • @petermarin
      @petermarin Рік тому

      @@virtualizeeverything as far as I can tell, there's no way to do it with an unprivileged container. I might be wrong?

    • @Montagic
      @Montagic 11 місяців тому

      From everything I could find there is not, only NFS drives

  • @monty9242
    @monty9242 6 місяців тому +1

    Why 0, 1005, 1006, 65535 and 100000?

  • @DerBarde2012
    @DerBarde2012 Рік тому

    did i misunderstand this or did you just bypas the unprivileged option by making your container a real root?

  • @mcmormus
    @mcmormus 7 місяців тому

    exactly what i was looking for but still dont understand whats going on

  • @thatguywiththe
    @thatguywiththe Рік тому

    Hiya! Coming from the other video :) Great video and guide! It's funny this is the part that I figured out last night and got it working perfectly. In my case I have a ZFS pool that is mounted to a priviledged container (For SAMBA Access) and to a unpriviledge container.
    After making the changes and confirming I could read/write, I proceeded to get docker and docker compose up and running. I've been trying to get radarr / sonarr up and running. Tried via docker and also with a .yml. Upon creation, I am unable to use the apps to access the mounted locations within the container inside the unpriviledge lxc... I think I might have an issue with permissions at the docker container level? Any suggestion is appreciated!

    • @virtualizeeverything
      @virtualizeeverything  Рік тому +1

      I have not tried this but maybe try making a user and a group in the docker file with the id in my case 1005

    • @virtualizeeverything
      @virtualizeeverything  Рік тому +2

      I just tried this and it worked here is the lines that I added to my docker file
      RUN groupadd -g 1005 customgroup && \
      useradd -u 1005 -g 1005 customuser
      USER customuser

    • @thatguywiththe
      @thatguywiththe Рік тому

      @@virtualizeeverything sweet I'll try it out and test it when I get back home. Thank you!

    • @thatguywiththe
      @thatguywiththe Рік тому

      I just got home and trying to figure out where this dockerfile is (sorry I'm not that experience with it yet).

    • @thatguywiththe
      @thatguywiththe Рік тому

      I was unable to get this working. I cannot give access to the users and apps within the cotnainer to my external storage. I've decided to try a different approach by segmenting my services depending on which needs access to storage (as priviledged LXC) and those that do not (as unpriviledged LXC). @@virtualizeeverything

  • @ecotts
    @ecotts 5 місяців тому

    Step 1 do all of that.
    Step 2 a few days down the line. Unplug your drives and power down your server to do a bit of service maintenance on your hardware, plug your drives back up, power on and boom ... its no longer mounted. LOL..
    Isn't it better to mount by UUID?

  • @ecotts
    @ecotts 5 місяців тому

    It boggles my brain why Proxmox developers still allow the adding of disk drives to be so overly complicated or fiddly. All people want to be able to do is plug a drive up have the OS detect it and provide us with simple method to pass them to a VM or LXC. In the current state of things in Proxmox people have more chance of butchering their existing data or crippling the Proxmox install trying to do a task that should be simple.

  • @socenthobbs
    @socenthobbs 10 місяців тому

    I'm a linux beginner and struggled when chown executed without error but did not successfully change the ownership, ownership remained root. I learned that NTFS doesn't support it. Instead you need to set the ownership in /etc/fstab for the entire partition.
    e.g. UUID="xxxxxx" /mnt/folder ntfs user,exec,uid=1005,gid=1005,rw 0 1

    • @socenthobbs
      @socenthobbs 10 місяців тому

      Ugh. Should have watched the whole video first. This was covered immediately after where I got stuck. Now I'm having huge io delay on this drive making it unusable. Struggling to solve that...