Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The dedicated server is running Cent OS, has 2 x 1TB hard drives. One domain is hosted on this server. I've been uploading files to the public/html folder no problem, but I've reached the maximum capacity of the hard drive this folder sits on.

What I want to do is to continue uploading files onto the second hard drive, but I cannot link to these files because they are outside of the public_html folder. What are all the possible ways I can grant access to these new files on the second hard drive to the users of my website?

I am not too tech-savvy so please kindly dumb-proof your answers :)

share|improve this question
2  
Easiest option is to get a bigger hard drive and migrate your public_html folder to it. Which brings a query to mind... why are you storing a terabyte of data in a folder called public_html? Trying to break the record for largest copyright infringement award ever? –  HopelessN00b Jul 31 '12 at 2:15
    
Do you have console (ssh) access to the server? –  Mark Henderson Jul 31 '12 at 2:17
    
The company from which you leased your server probably offers server management as well. If you aren't too tech-savvy then it may be wise to use such a service, either from them or from a third party server manager. Web Hosting Talk is a good place to shop for server management companies, or even dedicated servers. –  Michael Hampton Jul 31 '12 at 2:19
    
I have large raw video files that take up lots of space, who said anything about copyright? I do have console access yes, but very limited linux skills. I can follow clear enough instructions though. The hosting company is proving a major pain in the ass and migrating the server now is not an option. I just need to make the second hard drive files accessible through public_html folder/ or make them public in any other way. –  user1564396 Jul 31 '12 at 2:22
1  
You had better make sure you have a rock-solid backup and recovery plan in place, as it sounds like you're running with zero storage redundancy at the moment. Not a good position for someone to be in who admittedly doesn't know what he's doing. –  EEAA Jul 31 '12 at 2:25

2 Answers 2

up vote 1 down vote accepted

Assuming your html folder is in /var/www/public_html and your 2nd hard drive is mounted in /mnt/drive2

mkdir /var/www/public_html/morevideos
ln -s /mnt/drive2 /var/www/public_html/morevideos

And you can now upload everything you like into /var/www/public_html/morevideos and off you go

share|improve this answer
    
Thank you. This worked and exactly what I was looking for. You da man! –  user1564396 Jul 31 '12 at 3:58
    
@user1564396 - I just really hope you heeded the advice of everyone else on this question. i.e. get some backups –  Mark Henderson Jul 31 '12 at 4:27

There's no simple way to just append a drive to an existing file system. You could, in theory symlink a directory in the second hard drive with ln -s path/to/actual-directory-on-drive2 /path/to/directory/in/public where the actual folder is on the second drive, and the link is on the drive you just filled up. I do believe you'd want to create the link from a directory in the second hard drive to a directory in public html.

The smart way would be to have used LVM or similar so you can add additional storage to the same volume to start with, and added drives as needed and to have overprovisioned and planned for what happens when a drive gets filled up.

This is a textbook example of needing to plan before you build it ;)

share|improve this answer
1  
You could start an LVM volume on the second drive, migrate all the existing data to it, and then expand it to the first drive. –  Michael Hampton Jul 31 '12 at 2:26
    
@JourneymanGeek This is a textbook example of needing to plan That's an awful suggestion. There's a reason Plan9 never caught on, and even it had, there' no reason to suggest changing OS just to expand a hard drive. :o –  HopelessN00b Jul 31 '12 at 2:28
    
Plan 9 times, do once? ;p –  Journeyman Geek Jul 31 '12 at 2:31
    
@HopelessN00b - Plan 9 from Outer Space? I actually tried to watch that movie once. Terrible, even too terrible to be so bad it's good. –  Mark Henderson Jul 31 '12 at 2:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.