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:

  1. Temporarily disable your Centova Cast cron jobs.

    mv -f /etc/cron.d/centovacast /etc/centovacast-cron.disabled
    
  2. Stop any streams that may be online.

    /usr/local/centovacast/bin/ccmanage batch --method=stop --username=all
    
  3. Stop Centova Cast.

    service centovacast stop
    
  4. 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
    
  5. Create a placeholder vhosts directory.

    mkdir /usr/local/centovacast/var/vhosts
    
  6. Make sure ownerships are sane.

    chown ccuser.ccuser /home/vhosts /usr/local/centovacast/var/vhosts
    
  7. Set up the bind mount.

    echo "/home/vhosts     /usr/local/centovacast/var/vhosts   none   bind" >> /etc/fstab
    
  8. Mount the bind mount.

    mount /usr/local/centovacast/var/vhosts
    
  9. Start Centova Cast.

    service centovacast start
    
  10. Re-enable your Centova Cast cron jobs

    mv -f /etc/centovacast-cron.disabled /etc/cron.d/centovacast 
    
    1. 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.

Was this answer helpful? 1 Users Found This Useful (1 Votes)