Hello Everyone. First i am inexperienced with Linux and Cent-OS. So please forgive my ignorance.
I will try my best to explain my problem and what i actuaclly want.
I have a dedicated server with 3 Hard Drives and 1 SSD. The Centos 7 is installed on the 80 GB SSD and now three hard drives are free.
Among these three hard drives two are on raid controller. Which logically means i have two extra hard drives, (As raid will show two same hard drives as one).
Now i have two hard drives free which i want to use to store my data. But the problem is that, previously i was storing my data in /var/www/html
And now if i start uploading my files to /var/www/html the SSD will get full which i dont want. Even if i bind one of my hard drives to that directory the SSD will get full.
Or in simple words, I want my two extra hard drives work together and i upload files to them and users access them through Nginx web server but i dont want to upload files to my SSD.
I hope i made clear what i want.** And please if you have solution type all of the commands because i am inexperienced.** http://prntscr.com/e7cab6
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Do you initialized and partitioned your 2 hard drives? I see that you have 3 partitions on SSD, but I don’t see any on other hard drives. If you didn’t, you can follow DigitalOcean tutorial - How To Partition and Format Storage Devices in Linux.
Once you do this, or if you are already done, you can proceed.
/var/
and all other directories and files there (/var/www/html
and so on) are on root/
file system. Your root file system is on your SSD. To overcome this, you have two possibilities. You can change your nginx server block to use another location for/var/www/html
. Location of files are defined byroot
directive. Example server block:Root directive is what you want to change. After change is:
This is most easiest solution. Change
/mnt/www/html
with location where you mounted hard drive. There you also need to upload files.Second and riskier solution is to try to mount your hard drive to
/var/www
. In that case, you can go with default nginx config, but you should change/mnt/data
from above linked tutorial to/var/www
. Please be very careful when doing so! There is risk behind this, I didn’t tested this myself, but AFAIK it should work in theory!Because i always found helpful guides here. am i doing something wrong?
Why are you asking this on the DigitalOcean community?