Dockerfiles have their seperate path. Because of that Rsync doenst work, also no Datausage in the WebUI

This one appears to be what I was hoping would work, but apparently it passes UI checks but rsync isn’t liking it

Error: rsync: [sender] change_dir "/mnt/nvme/ix-apps" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]

I guess because it’s not mounted anywhere outside of /mnt/.ix-apps

root@truenas[~]# zfs mount | grep /mnt/nvme
nvme                            /mnt/nvme
nvme/VM                         /mnt/nvme/VM
root@truenas[~]#

and the validation explicitly requires the path starts with /mnt/<pool>

Are you able to reopen the ticket seeing as it’s been closed? Or should I raise another one and try to explain in a bit more depth?

EDIT:
No worries, I’ve raised another one: NAS-133923

3 Likes

Ive read your two bugreports, thank you for them.
To say “its a design choice” is just… stupid.
I get why you wanna keep user-error out of a new yet introduced system but this is just… plain stupid and unnecessary.
I thought TrueNas is meant to give the user Control over their data…
And docker became an important part of hosting.
I really really hope they mount the ix-apps the right way in the future.
The way they tried to hide the mount point has a very unpleasant flavor.

What the Hell… Its by deisgn that you cant backup your stuff… Great choice…
Its just a path that needs to get mounted diffrently…
Lets hope the “future release” comes before my drives fail.

You can - and should - configure host paths for all data used by your applications.

You can then snapshot and replicate these.

Why is everyone obsessed about rsync? ZFS replication is in every conceivable way superior. That does of course not change the problem with the special dataset that started this thread. But using host paths does.

Because it would solve just a small part of the problem.

  1. In that case you only backup your data but not the configuration
  2. What to do with Dockercontainers not seen by truenas?

My e.g. home assistant app also has the entire configuration in a host path dataset. I can completely nuke it, reinstall, and will be right where I was before.

Only thing to recreate is the host path assignments …

I must be misunderstanding something.

The dataset is mounted at /mnt/.ix-apps, that is the actual location in the file system.

If you attempt to access the data where it “would” be in the pool, if it were not explicitly mounted somewhere else, there will be nothing.

1 Like

Absolutely (and I do) - however, the ix managed datasets are something incredibly easy for a user (think someone using TrueNAS who may migrate to HexOS in the future) who simply wants to run an application like plex without specific configuration overhead. The fact that rsync and cloud sync tasks cannot use the ix-apps dataset as a target is absurd to me.

Someone might not necessarily want to replicate to another ZFS filesystem, so rsync in these cases is an excellent alternative. Even so, cloud sync tasks suffer from the same…

ix-apps can be set as the target for replication tasks:

root@truenas[~]# zfs list data/nvme_backup -r -d 1
NAME                       USED  AVAIL  REFER  MOUNTPOINT
data/nvme_backup          93.0G  55.9T   104K  /mnt/data/nvme_backup
data/nvme_backup/VM       61.3G  55.9T    96K  /mnt/data/nvme_backup/VM
data/nvme_backup/ix-apps  31.7G  55.9T   140K  /mnt/data/nvme_backup/ix-apps

I raised the ticket(s) as it seemed very unusual to not allow this functionality (to the point I believed it to be a regression from 24.04->24.10), though don’t make use of it myself, the only limit here seems to be the validation check failing. However just to check I did boot into a 24.04 environment to find it’s explicitly disallowed there too, even though it’s mounted inside of /mnt/tank!

Thats just odd…
Would you be able to explain to me how exactly hostpaths work?
How can i use them to move and backup my data?
In a way Rsync can access them?
also is there a way to use hostpaths outside of dockercontainers Truenas can see?

Of course. That is what host paths are.

So when you deploy e.g. Home Assistant from the standard iX systems catalog, the configuration dialog tells you that Home Assistant needs three storage volumes - with the default to use an “ixVolume dataset”. You can change each of them to “host path” instead.

The three volumes according to the “app recipe/dialog” are:

  • Home Assistant Config Storage
  • Home Assistant Media Storage
  • Home Assistant Postgres Data Storage

So in my main pool I have a dataset named “data” for all application data. In this I create:

<pool>/data/home-assistant
<pool>/data/home-assistant/config
<pool>/data/home-assistant/media
<pool>/data/home-assistant/postgres

Make sure to set the share type for /data/home-assistant to “generic” and the share type of the three “leaf” datasets to “apps”.

Then when deploying the app change each volume to “host path” and map it to the matching dataset you just created.

For the postgres dataset also tick “Automatic Permissions” because the postgres service does not run as root.

Save and apply - Home Assistant will be deployed and all application data will reside in a path outside the iX owned hidden dataset. You can snapshot and replicate to your heart’s content.

I’ll attach a screenshot for the postgres volume with the special flag “Automatic Permissions”. Leave disabled for other datasets that are not postgres.

But seriously all of this is in the docs. Are they in some way difficult to understand? What could be improved? The “host path” option was to my knowledge available in TN SCALE from the start.

Scroll down to “Understanding App Storage Volumes”:

Kind regards,
Patrick

1 Like

P.S. adding to that:

The reason why I have a top level “data” dataset where all my apps’ data resides is of course that I can now very easily create recursive snapshots and replications tasks for “data” to keep all data of all of my applications safe.

HTH,
Patrick

Already… much thanks for that.
And… is there a easy way i can move my already existing docker datasets to it?
so i can just move the files, change paths and boot back up?

As far as I know you will need to

  • create the datasets
  • copy the data first
  • delete the app
  • redeploy the app with the new settings

It should be not too difficult to get at the data on the command line and copy it to the destination datasets. I just cannot give you a complete walk through from the top of my head because I never did that. I used host paths from the start.

HTH,
Patrick