I would like to run a couple of lightweight containers on VyOS and I would like to keep their file systems separate from VyOS. I have added a separate SSD to the machine, partitioned and formatted it.
Now, I know I can mount the partition in /config/scripts/vyos-postconfig-bootup.script, but I was wondering if there’s a canonical mount point and maybe some CLI that I have completely missed. I scanned the documentation and searched it, but could not find anything.
As far as I know everything you put in /config (including subfolders) will be migrated (aka copied) to new system image once you perform an upgrade through “add system image”.
If you choose to have your containers on separate drive then using “/config/scripts/vyos-postconfig-bootup.script” (or perhaps rather the /config/scripts/vyos-preconfig-bootup.script so the container files are available when the config is being compiled during boot) is the option to use so that partition is being mounted.
Personally I would mount that as /config/containers or /opt/containers or /mnt/containers, probably one of the two later since you use a dedicated drive for them.
It seems the container overlays are in /usr/lib/live/mount/persistence/container/storage/overlay. I can’t seem to find how to select my mount point for this, in case I run out of space on my main partition.