This is accomplished through the use of a bind mount. The procedure for configuring a bind mount is documented in the Client Data (Linux)
If your Centova Cast server is already hosting client data, you will need to move the existing data to its new home prior to setting up the bind mount. The general procedure for doing so involves the following steps:
-
Temporarily disable your Centova Cast cron jobs.
mv -f /etc/cron.d/centovacast /etc/centovacast-cron.disabled
-
Stop any streams that may be online.
/usr/local/centovacast/bin/ccmanage batch --method=stop --username=all
-
Stop Centova Cast.
service centovacast stop
-
Move all client data to the new location. We will use
/home/vhosts
as the new path for our client data; change this to whatever path you would like to use.mv /usr/local/centovacast/var/vhosts /home
-
Create a placeholder
vhosts
directory.mkdir /usr/local/centovacast/var/vhosts
-
Make sure ownerships are sane.
chown ccuser.ccuser /home/vhosts /usr/local/centovacast/var/vhosts
-
Set up the bind mount.
echo "/home/vhosts /usr/local/centovacast/var/vhosts none bind" >> /etc/fstab
-
Mount the bind mount.
mount /usr/local/centovacast/var/vhosts
-
Start Centova Cast.
service centovacast start
-
Re-enable your Centova Cast cron jobs
mv -f /etc/centovacast-cron.disabled /etc/cron.d/centovacast
-
Optionally, start all streams.
/usr/local/centovacast/bin/ccmanage batch --method=start --username=all
-
After performing this procedure, the contents of /usr/local/centovacasst/var/vhosts/
should appear identical to the contents of the /home/vhosts/
directory -- /home/vhosts
has been "grafted" into the filesystem at a new location.
It is important to understand that, as a result of the mount command above,/usr/local/centovacast/var/vhosts
is now essentially a shortcut to the /home/vhosts
directory. While you can see the files in two different places, the files only physically exist (and thus only take up disk space) in the /home/vhosts
directory.
Accordingly, any changes you make in /usr/local/centovacast/var/vhosts
will actually affect /home/vhosts
-- for example, if you delete a file named /usr/local/centovacast/var/vhosts/user-x/foo.txt
, you're actually deleting /home/vhosts/user-x/foo.txt
.