I have a server with two 1TB hard drives. I have an uploads folder on
/disk2/uploads, That folder has filled up the entire hard drive. The other disk is basically empty. I want to have a spill over folder on the empty drive that hosts any additional uploads that don't fit on the first disk.
The problem is that my web application needs to know where the files are. One solution would be to have my web application upload all new files onto the empty disk, and when the application needs to fetch a file, it would see if it exists in the new location and if it doesn't it will check the old location. I would like to solve this using linux though.
Is it possible to create a symlink (or something), that would allow me to upload new files to /var/www/uploads and allow me to find the files in /disk2/uploads from the /var/www/uploads folder?
folder3. Then I would want this:
> ls /disk2/uploads folder1 folder2 > ls /var/www/uploads folder1 folder2 folder3
If such a solution exists, what would happen if
/disk2/uploads/folder1/foo.log exists, and I try to upload
/var/www/uploads/folder1/foo.log? That probably isn't an issue for me because our files are all timestamped in their name, but I am curious.