Proxmox Backup-server on LXC with external NAS

Good to know there are others doing PBS in a container. I arrived at the conclusion that I needed to do this after banging my head against how to get better throughput on a host-guest shared folder. 9p, NFS, and SMB all proved vastly inferior to bare-metal and LXC bind-mount performance.
 
Good to know but still a few missing parts to be valuable. A good start could be a how-to because for now, we should scan all the forum and a few Google pages to find how to do a LXC PBS under Proxmox.
 
Thanks for posting this @rickyo !
Its 2023 and I just used your guide to add a PBS LXC to my system.
All I needed to do is update your commands to be suitable with Debian bullseye:

Do:
Code:
apt-get update
apt-get dist-upgrade

Install the repo key
Code:
wget http://download.proxmox.com/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg

Add PBS debian package repo to /etc/apt/sources.list
Code:
# THIS IS THE NEW ADDITION
# PBS pbs-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pbs bullseye pbs-no-subscription

Install the PBS-server software
Code:
apt-get update
apt-get install proxmox-backup-server


Again thank you for this guide!
 
Was anyone able to passthrough a (LTO-5) tape drive to it?
To pass a LTO (or any device) to an LXC Container run:

Code:
root@server:/dev $ ls -alh /dev/st0
crw-rw---- 1 root tape 9, 0 Sep  1 22:10 /dev/st0

root@server:/dev $ ls -alh /dev/sg0
crw-rw---- 1 root tape 21, 0 Sep  1 22:10 /dev/sg0

root@server:/dev $ls -alh /dev/tape/by-id
drwxr-xr-x 2 root root 120 Sep  1 22:10 .
drwxr-xr-x 4 root root  80 Sep  1 14:48 ..
lrwxrwxrwx 1 root root   9 Sep  1 22:10 scsi-XXX -> ../../st0
lrwxrwxrwx 1 root root  10 Sep  1 22:10 scsi-XXX-nst -> ../../nst0

Then add to the lxc config using the two numbers from above (9, 0):
Code:
lxc.cgroup2.devices.allow: c 9:* rwm
lxc.cgroup2.devices.allow: c 10:* rwm
lxc.cgroup2.devices.allow: c 21:* rwm
lxc.mount.entry: /dev/st0 dev/st0 none bind,optional,create=file
lxc.mount.entry: /dev/nst0 dev/nst0 none bind,optional,create=file
lxc.mount.entry: /dev/sg0 dev/sg0 none bind,optional,create=file
lxc.mount.entry: /dev/tape/by-id/scsi-XXX dev/tape/by-id/scsi-XXX none bind,optional,create=file
lxc.mount.entry: /dev/tape/by-id/scsi-XXX-nst dev/tape/by-id/scsi-XXX-nst none bind,optional,create=file

That got my LTO-6 drive passed through and properly recognized by `proxmox-tape`
 
Last edited:
  • Like
Reactions: spitf1r3
To pass a LTO (or any device) to an LXC Container run:

Code:
root@server:/dev $ ls -alh /dev/st0
crw-rw---- 1 root tape 9, 0 Sep  1 22:10 /dev/st0

root@server:/dev $ ls -alh /dev/sg0
crw-rw---- 1 root tape 21, 0 Sep  1 22:10 /dev/sg0

root@server:/dev $ls -alh /dev/tape/by-id
drwxr-xr-x 2 root root 120 Sep  1 22:10 .
drwxr-xr-x 4 root root  80 Sep  1 14:48 ..
lrwxrwxrwx 1 root root   9 Sep  1 22:10 scsi-XXX -> ../../st0
lrwxrwxrwx 1 root root  10 Sep  1 22:10 scsi-XXX-nst -> ../../nst0

Then add to the lxc config using the two numbers from above (9, 0):
Code:
lxc.cgroup2.devices.allow: c 9:* rwm
lxc.cgroup2.devices.allow: c 10:* rwm
lxc.cgroup2.devices.allow: c 21:* rwm
lxc.mount.entry: /dev/st0 dev/st0 none bind,optional,create=file
lxc.mount.entry: /dev/nst0 dev/nst0 none bind,optional,create=file
lxc.mount.entry: /dev/sg0 dev/sg0 none bind,optional,create=file
lxc.mount.entry: /dev/tape/by-id/scsi-XXX dev/tape/by-id/scsi-XXX none bind,optional,create=file
lxc.mount.entry: /dev/tape/by-id/scsi-XXX-nst dev/tape/by-id/scsi-XXX-nst none bind,optional,create=file

That got my LTO-6 drive passed through and properly recognized by `proxmox-tape`
Which lxc config file do you mean? I've adjusted the paths, and tried adding it to my /etc/lxc/default.conf before creating ct, and it wasn't mounted afterwards.
/etc/pve/lxc/<id>.conf has a different format, and does not seem to understand lxc config entries
 
That
Which lxc config file do you mean? I've adjusted the paths, and tried adding it to my /etc/lxc/default.conf before creating ct, and it wasn't mounted afterwards.
/etc/pve/lxc/<id>.conf has a different format, and does not seem to understand lxc config entries
I added those paths to the /etc/pve/lxc/<id>.conf
 
  • Like
Reactions: spitf1r3

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!