2. Installation
Source: PBS on Truenas by Lawrence Systems
Alright! So you have chosen to install PBS on top of a TrueNas Scale bare metal instance. Well we don't need to go through installing TrueNas scale since you have already don that here Installing TrueNas Scale. Okey so you have your TrueNas scale up and running then this will be the steps
Creating a generic dataset for your PBS container
- Log in to your TrueNAS Web UI.
- Navigate to Datasets on the left sidebar.
- Select the parent dataset or pool where you want the backups to live.
- Click Add Dataset (top right).
- Name:
pbs-storage(or your preferred name). - Dataset Preset: Select Generic.
-
Click Save.
In TrueNAS Create the Subdirectory and Set ACLs
Working in a subdirectory prevents PBS from conflicting with any special folders and let’s set and limit user permission. We will perform this in the TrueNAS Shell.
- Go to System Settings → Shell or use SSH
- If using the web shell use
sudoof if you are notrootuser - Go into the new dataset
cd /mnt/tank/pbs-storage/ - Create the directory:
mkdir datastore1 - Set Backup Owner For Container
chown -R 2147000035:2147000035 datastore1 - Apply the Access ACL & Default ACL (Inheritance):
setfacl -m u:2147000035:rwx,d:u:2147000035:rwx datastore1
Where do the permissions come from ?
In TrueNAS 25, the default mapping for unprivileged containers starts at 2147000001.
- Base ID: 2147000001 (This is the “Start” of the container’s world).
- Root (0) inside the container: 2147000001 + 0 = 2147000001 on the Host.
- Backup (34) inside the container: 2147000001 + 34 = 2147000035 on the Host.
- Standard User (1000) inside the container: 2147000001 + 1000 = 2147010001 on the Host.
| If you are… | ID in the Container | ID on the TrueNAS Host |
|---|---|---|
| Root User | 0 | 2147000001 |
| PBS Backup User | 34 | 2147000035 |
| Standard User | 1000 | 2147010001 |
Truenas VM with virtual drives
If you want to go the virtual drive route then there is one little tweak that you need to make for TrueNas VM to recognize different drives.
- Go your backup PVE's shell and nano into /etc/pve/qemu-server/VM-ID.conf
- In here you want to add serial numbers to the disks that you added to the VM
- This does not need to be complicated, they just need to be different for each drive. For instance you could use serial=DRIVE00X for each drive and changing X for each added drive. For instance with two drives it looks like this
scsi0: local-zfs:vm-1002-disk-0,discard=on,iothread=1,size=12G,ssd=1,serial=DISK001
scsi1: tank:vm-1002-disk-1,discard=on,iothread=1,size=2000G,ssd=1,serial=DISK002
No comments to display
No comments to display