solved streamed content on diferent drive/subdomain/cdn

soaringeagle
@soaringeagle
10 years ago
3,304 posts
ssd drives are expensive but awesome for fast load speeds
sata drives are cheap for massive ammounts of data
it would be awesome if all vids and music that use alot of space could be moved to a sata drive an account like cdn.domain.com
and all streamed data that eats up a whole lotta space can be streamed off a cheaper drive


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 03/08/15 08:07:23AM
brian
@brian
10 years ago
10,148 posts
soaringeagle:
ssd drives are expensive but awesome for fast load speeds
sata drives are cheap for massive ammounts of data
it would be awesome if all vids and music that use alot of space could be moved to a sata drive an account like cdn.domain.com
and all streamed data that eats up a whole lotta space can be streamed off a cheaper drive

You can already do this:

- add a second large SATA drive to your server
- move /data/media to the SATA drive - i.e. /mnt/media
- create a symbolic link to the new location - i.e. in /home/jamroom/public_html/data you would create a symlink:

media -> /mnt/media

Then all your site media is located on the SATA drive while all other parts of JR are on the fast SSD.

I'd recommend it if you have the setup for it.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
soaringeagle
@soaringeagle
10 years ago
3,304 posts
would that also move photos
id like to keep photos on the fast drive


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
brian
@brian
10 years ago
10,148 posts
soaringeagle:
would that also move photos
id like to keep photos on the fast drive

Yes that would, but I don't think that would matter much.

EDIT TO ADD: your photos are being served out of data/cache/jrImage after being resized, so you'd be serving photos from your SSD. The "master" image would be on the SATA drive.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 02/02/15 02:25:06PM
soaringeagle
@soaringeagle
10 years ago
3,304 posts
ok this is awesome news and i will talk to my server guys about it


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
soaringeagle
@soaringeagle
10 years ago
3,304 posts
ok 15 a month sure beats 100+ a month for 1/2 the space
your a lifesaver so can u explain the processin detail


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
soaringeagle
@soaringeagle
10 years ago
3,304 posts
not sure i did this right argh
i mounted a drive at /mediadrive
i used cp -R to copy media to mediadrive
then
ln -s /mediadrive /home/greentechnologyf/public_html/data/media

AH00548: NameVirtualHost has no effect and will be removed in the next release /usr/local/apache/conf/httpd.conf:2130
[root@server data]# cd media
[root@server media]# ls -alh
total 312K
drwxr-xr-x   17 greentechnologyf greentechnologyf 4.0K Feb  3 12:51 .
drwxr-xr-x   11 greentechnologyf greentechnologyf 4.0K Feb  3 04:34 ..
drwxr-xr-x    3 greentechnologyf greentechnologyf 4.0K Nov  2 12:03 0
drwxr-xr-x  923 greentechnologyf greentechnologyf  20K Jan 13 00:50 1
drwxr-xr-x 1002 greentechnologyf greentechnologyf  20K Jan 13 01:15 10
drwxr-xr-x 1002 greentechnologyf greentechnologyf  28K Dec 28 00:53 11
drwxr-xr-x 1002 greentechnologyf greentechnologyf  28K Dec 28 01:13 12
drwxr-xr-x 1002 greentechnologyf greentechnologyf  24K Dec 28 01:16 13
drwxr-xr-x  929 greentechnologyf greentechnologyf  20K Jan 27 10:18 14
drwxr-xr-x 1002 greentechnologyf greentechnologyf  20K Jan 13 00:51 2
drwxr-xr-x 1002 greentechnologyf greentechnologyf  20K Dec 20 03:21 3
drwxr-xr-x 1002 greentechnologyf greentechnologyf  20K Dec 19 12:50 4
drwxr-xr-x 1002 greentechnologyf greentechnologyf  20K Jan  8 06:19 5
drwxr-xr-x 1002 greentechnologyf greentechnologyf  20K Jan 12 19:25 6
drwxr-xr-x 1002 greentechnologyf greentechnologyf  20K Jan 12 19:28 7
drwxr-xr-x 1002 greentechnologyf greentechnologyf  20K Jan 12 19:31 8
drwxr-xr-x 1002 greentechnologyf greentechnologyf  20K Jan 13 01:12 9
lrwxrwxrwx    1 root             root               11 Feb  3 12:51 mediadrive -> /mediadrive
[root@server media]# ls -alh

is thst right
is it safe to delete the files in media


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
brian
@brian
10 years ago
10,148 posts
No - I don't think you did it right. That "mediadrive" symlink is wrong.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
10 years ago
10,148 posts
I'll do my best to explain this, but it requires an understanding of how UNIX symlinks work.

So....

Let's say you have TWO hard drives in your server:

/dev/disk1
/dev/disk2

and /home/yoursite.com is located on /dev/disk1

and

/mediastore is located on /dev/disk2 - you want all the media to be in /mediastore

So you would do this as the ROOT user:

cd /home/yoursite.com/data
mv media /mediastore (or cp -r media /mediastore)
ln -s /mediastore media

Now when you:

cd media

you're really going to /mediastore/media


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
soaringeagle
@soaringeagle
10 years ago
3,304 posts
argh ok thnx ill try this again tonight


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
soaringeagle
@soaringeagle
10 years ago
3,304 posts
ok next qquestion though since i want to cp to avoid downtime
after establishiug the link how do i access the old files to delete them if media takes me to new drive
would cpanel filemanager access old media or new


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
brian
@brian
10 years ago
10,148 posts
soaringeagle:
ok next qquestion though since i want to cp to avoid downtime
after establishiug the link how do i access the old files to delete them if media takes me to new drive
would cpanel filemanager access old media or new

You wouldn't - you could not create the "media" symlink with the old "media" directory still there. So you'd really want to do a mv and not a cp (or cp and then rename media to media.old).


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
soaringeagle
@soaringeagle
10 years ago
3,304 posts
this is such a huge huge help
this should be added to a recomended setup for extra large sites
since a 1 tb sata is 16 a month and a 160 gig ssd is like 59 or more im not sure im running 2 650's and its expensive!
but as long as i keep running media off sata drives theres no limit to how much i can expand


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
soaringeagle
@soaringeagle
10 years ago
3,304 posts
@brian i ran into a huge issue
its working but none on the images i uploaded through the skin efditor work and cant re-upload them! im going to email u logins and images its 6 am ive been up all night woorking on this


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
soaringeagle
@soaringeagle
10 years ago
3,304 posts
also icons arent working

whats odd is i tried uploading the background to the root and adding it to css
then tried sticking it in that test directory i think paul put there
nothings working!


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
brian
@brian
10 years ago
10,148 posts
This is due to FolllowSymlinks not being allowed in your Apache:

[Wed Feb 04 14:25:45.261040 2015] [core:error] [pid 20111] [client 66.249.79.104:50380] AH00037: Symbolic link not allowed or link target not accessible: /home/greentechnologyf/public_html/data/media

Since you run WHM I'm not sure what you need to setup, but in your domain config you need to add:

AllowOverride All

So Jamroom's +FollowSymlinks is allowed in the .htaccess file.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
soaringeagle
@soaringeagle
10 years ago
3,304 posts
they told me because its managed server symlinks arent alowed outside /home but yiou fixed it when they were being no help


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
brian
@brian
10 years ago
10,148 posts
Glad it's working. Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
soaringeagle
@soaringeagle
10 years ago
3,304 posts
tell me exactly how u fixed it as its not working again although in ftop i clearly follow the symlinks


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
soaringeagle
@soaringeagle
10 years ago
3,304 posts
nevermind found the answer myself


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

Tags