Share Docker Volumes directory via SMB

Hi All, I am new to TrueNAS. I have just installed TrueNAS SCALE (25.04.2.1) on my new NAS hardware. I have a nvme pool configured for Docker and other Virtualisations and an HDD pool for media files.

I have configured the Apps to use my nvme pool and it apears docker is running in “/mnt/.ix-apps/docker/” which I guess is standard. All I want to be able to do is access all the docker volumes via SMB from a windows device. It seems that becuase “/mnt/.ix-apps/docker/” is not part of my nvme dataset I cannot create an SMB share to it.

Can anyone suggest the best way to achieve this? I am open to suggestions before I start rebuilding my docker infrastructure. I have found some examples where you can move the docker directories by modifying the docker json files but I am not sure if truenas will like this as it is used by the Apps component. My Linux and truenas is pretty limited so I am open to suggestions.

Have you checked out the Apps Storage section on : Getting Started with Apps | TrueNAS Apps Market

You should be careful about file permissions while doing so.
Also, it should probably be the other way around.
Create a dataset with the SMB preset, then, instead of using Docker volumes, use host paths that point to the required paths in the newly created dataset.

1 Like

Thanks for the responses. I have checked out the getting started with Apps Guide. But it doesn’t really go into the detail of the backend directory structure and permissions from what I can see.

@TheColin21 I did create a dataset and SMB share and then pointed the Apps to use that dataset. The issue seems to be that /mnt/.ix-apps/docker/ is not part of that dataset. Maybe this is a gap in my knowledge of Linux filesystems but the files in /mnt/.ix-apps/docker/ do not exist in the SMB or dataset I created.

To provide some context the dataset I created is “VirtualizationPool” and it is mounted to “/mnt/VirtualizationPool/” if I “ls” this directory it is empty

The Apps section is configured to use the VirtualizationPool. If I do a “findmnt -l” it shows that “/mnt/.ix-apps” has a SOURCE of VirtualizationPool/ix-apps. I don’t understand why if I try and cd to /mnt/VirtualizationPool/ix-apps it says “no such file or directory”

You’re mixing two things here - pools and datasets.

You created a pool, which does contain a dataset “ix-apps” mounted to “/mnt/.ix-apps” and is hidden from the UI.

You should create seperate datasets with fitting settings for different usecases inside of your pool.

You might want to read up on ZFS in general.
There are probably better guides out there but you could take a look at Introduction to ZFS | TrueNAS Community and ZFS Guide for starters and advanced users. Concepts, pool config, tuning, troubleshooting - Wikis & How-to Guides - Level1Techs Forums - both might not be very up to date and omit RAIDZ expansion, fast deduplication and so on but the basic concepts should still be the same.

Or, I know, unpopular opinion, but if you just want a very basic understanding of the concepts of ZFS an LLM might help too. You don’t get too detailed there.

@TheColin21, you are correct. I created the Pool and TrueNAS created the dataset ix-apps when I told it to use the pool for the apps. As you say becuase the dataset is hidden from the UI I cannot create a share against ix-apps. Do you know if it is possible to expose UI hidden datasets much like how the built in users can be exposed?

Again: that is not what you want to do.
You should create (at least one) different dataset(s), preferrably using the SMB share preset, and then adjust you application(s) so it uses host paths on this dataset, if you want to share data between SMB and applications.

@TheColin21, thanks for the feedback and guidance. I have come to the conclusion that creating datasets for each docker container is the right way to go. On my previous NAS I used volumes in Portainer but realise using datasets and binds in portainer is no less effort.

Sounds much better.
Remember though, that each dataset is a seperate file system. That means, that files for example can’t just instantly be moved between those.