Setup
i have an incus lxc spun up using ubuntu noble.
i have a dataset on the truenas host (25.04.1) /mnt/tank/configs
permissions are:
there is a subdataset called test
created with apps preset permissions:
Passing thru the hostpath
i am passing the /mnt/tank/configs
dataset and all its subdatasets to the incus lxc with the command: incus config device add qbit config disk source=/mnt/tank/configs path=/configs shift=true
inside the lxc it looks like this:
root@qbit:/configs# ls -l
total 70
drwxrwx--- 2 root root 2 Apr 30 19:42 corecontrol
drwxrwx--- 4 apps apps 5 May 13 11:18 dockge
-rw-r--r-- 1 root apps 20443 May 28 08:33 get-docker.sh
drwxrwx--- 7 apps apps 11 May 13 11:29 jellyfin
drwxrwx--- 4 root root 6 May 13 11:42 jellyseerr
drwxrwx--- 2 root root 2 Mar 12 20:05 plex
drwxrwx--- 2 root root 2 Mar 20 16:43 portainer
drwxrwxr-x 5 root root 6 May 28 08:25 profilarr
drwxrwx--- 7 apps apps 13 May 27 10:06 prowlarr
drwxrwx--- 4 apps apps 4 May 13 11:29 qbittorrent
drwxrwx--- 6 apps apps 12 May 27 10:02 radarr
drwxr-xr-x 5 apps apps 11 May 28 08:58 radarr2
drwxrwx--- 2 root root 2 Feb 27 17:44 recyclarr
drwxrwx--- 2 root root 2 Feb 25 20:02 romm
drwxrwx--- 6 apps apps 12 May 27 10:09 sonarr
drwxrwx--- 2 root root 2 May 9 10:35 suggestarr
drwxrwx--- 2 root root 2 Feb 26 20:14 tailscale
drwxr-xr-x 5 apps apps 13 May 28 09:11 test
drwxrwx--- 2 root root 2 Feb 25 16:37 wireguard
drwxrwx--- 2 root root 2 Apr 11 23:38 wizarr
we can see test
is passed with correct permissions.
Using the test
dataset for Sonarr
now i use the test
dataset to hold the config file for sonarr:
services:
sonarr:
image: lscr.io/linuxserver/sonarr:latest
container_name: sonarr
environment:
- PUID=568
- PGID=568
- TZ=America/New_York
volumes:
- /configs/test:/config
- /media:/media
ports:
- 8989:8989
restart: unless-stopped
root@qbit:/configs# cd test/
root@qbit:/configs/test# ls -l
total 70
drwxr-xr-x 3 apps apps 3 May 28 09:10 Sentry
drwxr-xr-x 2 apps apps 3 May 28 09:10 asp
-rw-r--r-- 1 apps apps 571 May 28 09:10 config.xml
drwxr-xr-x 2 apps apps 4 May 28 09:10 logs
-rw-r--r-- 1 apps apps 61440 May 28 09:11 logs.db
-rw-r--r-- 1 apps apps 32768 May 28 09:11 logs.db-shm
-rw-r--r-- 1 apps apps 24752 May 28 09:11 logs.db-wal
-rw-r--r-- 1 apps apps 376832 May 28 09:11 sonarr.db
-rw-r--r-- 1 apps apps 32768 May 28 09:11 sonarr.db-shm
-rw-r--r-- 1 apps apps 37112 May 28 09:11 sonarr.db-wal
-rw-r--r-- 1 apps apps 3 May 28 09:10 sonarr.pid
Heres the rub
on the truenas host it shows the dataset as empty:
root@truenas-test[/mnt/tank/configs/test]# ls -l
total 0
but within the lxc the dataset shows as holding all the correct config files (shown above).