0
I have the following directories:
/var/steamcmd
/var/servers/1/custom
/var/servers/2/custom
/var/servers/3/custom
... there could be many directories like this, not just 3.
My goal is to make the directory steamcmd
the base, and for each custom
directory I want the files to be merged with the base, so if there is a file in both custom
and steamcmd
then custom
will be prioritized.
In order to do so I decided first to focus on one directory (/var/servers/1/...
) and created another 2 directories, so my directories are:
/var/steamcmd ---------------> lowerdir
/var/servers/1/custom -------> upperdir
/var/servers/1/overlayWork --> work directory
/var/servers/1/steamcmd -----> the merged folder
I came up with this command, but with no success:
$ mount -t overlay -o \
lowerdir=/var/steamcmd,\
upperdir=/var/servers/1/custom,\
workdir=/var/servers/1/overlayWork \
/var/servers/1/steamcmd
I'm getting the following error when executing:
mount: /var/servers/1/steamcmd: can't find in /etc/fstab.
How do I fix this? and can I make this work with multiple directories like presented above? (/var/servers/{X}/custom
)
1You need
overlay
as the first positional parameter, as inmount -t overlay -o lowerdir=/var/steamcmd,upperdir=/var/servers/1/custom,workdir=/var/servers/1/overlayWork overlay /var/servers/1/steamcmd
. The extraoverlay
can also precede the-o
. – AFH – 2018-06-09T15:57:40.993I'll make it an answer, so others can see that it's solved. – AFH – 2018-06-09T17:11:31.717