0

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 :)

5
  • 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? Jul 31, 2012 at 2:15
  • Do you have console (ssh) access to the server? Jul 31, 2012 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. Jul 31, 2012 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. Jul 31, 2012 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, 2012 at 2:25

2 Answers 2

1

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

2
  • Thank you. This worked and exactly what I was looking for. You da man! Jul 31, 2012 at 3:58
  • @user1564396 - I just really hope you heeded the advice of everyone else on this question. i.e. get some backups Jul 31, 2012 at 4:27
2

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 ;)

4
  • 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. Jul 31, 2012 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 Jul 31, 2012 at 2:28
  • Plan 9 times, do once? ;p Jul 31, 2012 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. Jul 31, 2012 at 2:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .