Hi. I switched from a few SBCs to a proxmox-server and i really enjoy it. Now - after playing a little bit around - i plugged an external 8tb-hdd on my server mainly for backups. I followed this tutorial: https://ostechnix.com/add-external-usb-storage-to-proxmox/

Next step is to use urbackup. I created a folder /urbackup on the 8tb-hdd and now i would like to assign this folder to the urbackup-docker but i do not understand how to do this.

What “content” do i have to choose for this case and how can i assign the folder to the docker?

Important EDIT: I forgot to mention that i do not use a VM but LXC!

SOLUTION in this case is pretty simple: https://pve.proxmox.com/wiki/Linux_Container#_bind_mount_points

For example, to make the directory /mnt/bindmounts/shared accessible in the container with ID 100 under the path /shared, add a configuration line such as:

mp0: /mnt/bindmounts/shared,mp=/shared

into /etc/pve/lxc/100.conf.

Or alternatively use the pct tool:

pct set 100 -mp0 /mnt/bindmounts/shared,mp=/shared

to achieve the same result.

Thanks a lot for your help!

      • CurbsTickle@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 months ago

        LXC would be a CT yes.

        pct set ### -mp0 /host/dir,mp=/container/mount/point

        With ### being the ID of the LXC.

  • 4am@lemm.ee
    link
    fedilink
    English
    arrow-up
    3
    ·
    7 months ago

    Are you running docker on the PVE host? Or within a LXC container or VM?

    Note that running docker on the PVE host is not recommended as this can cause networking problems for both docker and the host+guests

    If you are running docker in a VM as is recommended then pass thru the USB drive to that VM, it will act as if it was plugged directly into the VM.

    • moddy@feddit.deOP
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      7 months ago

      Ah, ok, i see. In the future i always have to write about the way i host the services on the proxmox. I use onlx LXC’s. Also docker is in a LXC.

  • tvcvt@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 months ago

    Is this urbackup-docker in a VM or an LXC? If the latter, you don’t need to add it in storage at all; you can bind mount the folder and use it directly. Here’s some info on that. If it’s in a VM and you want to use the directory directly (as in not just make a disk image inside the directory to pass as a block device) you’ll have to do some file sharing to the VM.