Hello,
when you install apps you have the option of using the storage type ixVolume or manually Host Path.
When should you use which and are there advantages and disadvantages?
From my understanding, which may be completely wrong:
ixVolumes are containerized storage volumes accessible only to the app. You cannot cd/ls your way to the files stored on these volumes like you can other data.
Host Path will mount the given path into the container. Because a process or user can cd/ls their way to this data, thereās a risk that permissions changes or file locks can cause problems for the host or app.
Personally, I use Host Path for most situations, for these reasons:
- App configurations: I like having the files directly accessible from the host. This makes migration/backups/editing of the configs a bit easier. Shut the container down before modifying the configs.
- Media: For my video, music, book services, youād need to āduplicateā this data to put them in an ixVolume. Keep aware that modifying data in one process can cause problems with another if theyāre accessing the media simultaneously.
I really only use ixVolumes for apps that donāt need much configuration (for example Tailscale) or apps Iām testing.
@Jorsher has covered a lot. But a few more points perhapsā¦
The issue with ixVolumes is that they are semi-permanent. If you find you need to delete the App and reinstall, the data is lost.
As previously covered, ixVolumes are (I think) held within the ix-applications
dataset and are subject to the performance characteristics, quotas, Snapshot/Replication settings etc. for that dataset. Host Paths are external to the container and can be separately managed.
My take on when to use ixVolumes:
- For temporary files that are too big to be held in memory by using
/tmp
. - For static background data automatically downloaded by the app from the internet e.g. the ClamAV virus database etc.
IMO literally everything else should have a Dataset of its own and accessed by Host Paths.
Migration
It IS possible to move data from an ixVolume to a Host Path (I know because I did it with my Plex Metadata) using the following steps (I will use Plex as an example)ā¦
-
Create a dataset to hold the data currently in an ixVolume. Set the permissions to the apps UID/GID.
-
Add a new additional Host Path for this new dataset to the app settings at (say) the container path
/hostpath
. -
Start the App, and open a shell inside the container.
-
Locate the ixVolume data (which will depend on the application container definitions) and
cp
the data over tohostpath
. -
Once you are sure that you have the data copied over and wonāt lose it, then you can re-edit the app settings to remove the extra Host Path you added in step 2. and switch the pre-defined ixVolume to the Host Path dataset.
If you want more safety, take a snapshot of the ix-applications
dataset beforehand so that you can recover the ixVolume from this snapshot if necessary.
And vote for this feature request