Symlinks and Binding

Read 16633 times
Hello,

as i understand v3 no longer supports using symlinks in the media library. Could someone please expand on how i could possibly using bind points to implement a shared media library across multiple streams? I can set up a bind and mount it to one stream no problem, however i seem unable to then bind the same directory to another stream in order for both streams to use the shared media folder? Any help would be great.

thanks,
gavin
Code: [Select]
cx001:/usr/local/centovacast/var/vhosts# mkdir sharedmedia
cx001:/usr/local/centovacast/var/vhosts# cd sharedmedia
cx001:/usr/local/centovacast/var/vhosts/sharedmedia# touch test1.mp3
cx001:/usr/local/centovacast/var/vhosts/sharedmedia# touch test2.mp3
cx001:/usr/local/centovacast/var/vhosts/sharedmedia# touch test3.mp3
cx001:/usr/local/centovacast/var/vhosts/sharedmedia# ll
total 0
-rw-r--r-- 1 root root 0 Feb 18 19:03 test1.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test2.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test3.mp3
cx001:/usr/local/centovacast/var/vhosts/sharedmedia# cd ..
cx001:/usr/local/centovacast/var/vhosts# ll
total 16
drwxr-xr-x 2 root root 4096 Feb 18 19:03 sharedmedia
drwxr-xr-x 3 root root 4096 Feb 18 19:03 stream1
drwxr-xr-x 3 root root 4096 Feb 18 19:03 stream2
drwxr-xr-x 3 root root 4096 Feb 18 19:03 stream3
cx001:/usr/local/centovacast/var/vhosts# mount --bind sharedmedia stream1/var/spool/media
cx001:/usr/local/centovacast/var/vhosts# mount --bind sharedmedia stream2/var/spool/media
cx001:/usr/local/centovacast/var/vhosts# mount --bind sharedmedia stream3/var/spool/media
cx001:/usr/local/centovacast/var/vhosts# ll stream1/var/spool/media
ttotal 0
-rw-r--r-- 1 root root 0 Feb 18 19:03 test1.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test2.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test3.mp3
cx001:/usr/local/centovacast/var/vhosts# ll stream2/var/spool/media
total 0
-rw-r--r-- 1 root root 0 Feb 18 19:03 test1.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test2.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test3.mp3
cx001:/usr/local/centovacast/var/vhosts# ll stream3/var/spool/media
total 0
-rw-r--r-- 1 root root 0 Feb 18 19:03 test1.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test2.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test3.mp3
cx001:/usr/local/centovacast/var/vhosts#
is that how to do symlink on v3.

If not can you explain how to do it i got a client asking about symlink for a private reseller

Kris
the procedure is detailed under the "Client Data (Linux)" section here:
http://www.centova.com/doc/cast/internals/files

The article explains how to setup a bind mount for the entire /vhosts/ directory (so for all your users), so if you want to create it for a single user, you should replace /usr/local/centovacast/var/vhosts with /usr/local/centovacast/var/vhosts/USERNAME   (replace USERNAME with the actual user's account name)
What impact would running this change have on a running server (e.g: would the streams need to be restarted, etc)?

Thanks.
---
Code: [Select]
cx001:/usr/local/centovacast/var/vhosts# mkdir sharedmedia
cx001:/usr/local/centovacast/var/vhosts# cd sharedmedia
cx001:/usr/local/centovacast/var/vhosts/sharedmedia# touch test1.mp3
cx001:/usr/local/centovacast/var/vhosts/sharedmedia# touch test2.mp3
cx001:/usr/local/centovacast/var/vhosts/sharedmedia# touch test3.mp3
cx001:/usr/local/centovacast/var/vhosts/sharedmedia# ll
total 0
-rw-r--r-- 1 root root 0 Feb 18 19:03 test1.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test2.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test3.mp3
cx001:/usr/local/centovacast/var/vhosts/sharedmedia# cd ..
cx001:/usr/local/centovacast/var/vhosts# ll
total 16
drwxr-xr-x 2 root root 4096 Feb 18 19:03 sharedmedia
drwxr-xr-x 3 root root 4096 Feb 18 19:03 stream1
drwxr-xr-x 3 root root 4096 Feb 18 19:03 stream2
drwxr-xr-x 3 root root 4096 Feb 18 19:03 stream3
cx001:/usr/local/centovacast/var/vhosts# mount --bind sharedmedia stream1/var/spool/media
cx001:/usr/local/centovacast/var/vhosts# mount --bind sharedmedia stream2/var/spool/media
cx001:/usr/local/centovacast/var/vhosts# mount --bind sharedmedia stream3/var/spool/media
cx001:/usr/local/centovacast/var/vhosts# ll stream1/var/spool/media
ttotal 0
-rw-r--r-- 1 root root 0 Feb 18 19:03 test1.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test2.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test3.mp3
cx001:/usr/local/centovacast/var/vhosts# ll stream2/var/spool/media
total 0
-rw-r--r-- 1 root root 0 Feb 18 19:03 test1.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test2.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test3.mp3
cx001:/usr/local/centovacast/var/vhosts# ll stream3/var/spool/media
total 0
-rw-r--r-- 1 root root 0 Feb 18 19:03 test1.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test2.mp3
-rw-r--r-- 1 root root 0 Feb 18 19:03 test3.mp3
cx001:/usr/local/centovacast/var/vhosts#
What impact would running this change have on a running server (e.g: would the streams need to be restarted, etc)?

Thanks.

That is just an example, the article mentioned by Alexiu explains how to add this mounts to fstab so that they'll be re-mounted in case of a server reboot.
I realise that but is adding the new mounts transparent to Centova or does the webserver need restarting, etc?
I realise that but is adding the new mounts transparent to Centova or does the webserver need restarting, etc?

Mounts occur at a kernel level, so yes they are transparent for any application. It will be as if you just moved some files there.

HTH
Thanks Roger.