Page 1 of 1

Specifying location of web folders and db storage?

Posted: Wed Oct 11, 2017 2:28 pm
by lehthanis
I am wanting to configure vesta for my dedicated server, and it has a raid1 array that I'd like to put the web files and the mysql storage. The location is /mnt/md0/

In the past I had all of my nginx domains at /mnt/md0/html/ and all of my mysql databases at /mnt/md0/mysql

How can I make this change for my vesta setup?

Re: Specifying location of web folders and db storage?

Posted: Wed Oct 11, 2017 7:44 pm
by mehargags
Well, you should have mounted your raid partition as /home before installing vestacp... should have eased out the operation.

you can still backup /home and then delete it and mount /raidpartition to /home

Re: Specifying location of web folders and db storage?

Posted: Wed Oct 11, 2017 8:22 pm
by lehthanis
Well I'm still experimenting for now on a cloud server. I haven't installed on my live server yet, I'm trying to work out all the kinks first ;)

If the raid array is already mounted by default as /mnt/md0/ is there anything I can do to change that without reinstalling ubuntu or repartitioning the whole OS? If so, what's the commands to mount /mnt/md0 to /home?

Re: Specifying location of web folders and db storage?

Posted: Fri Oct 13, 2017 2:10 am
by lehthanis
So I've been doing a little research and figured out how to modify my fstab to mound /dev/sd0 to /home...no problem...

But before I do that I want to see what needs to be done exactly...

I curently have /mnt/md0/html and /mnt/md0/mysql and those folders house my nginx website data and mysql data...

if I add a line to fstab mounting /dev/md0 to /home and rsync all my user home folders to that, when I reboot, will the /mnt/md0/html and /mnt/md0/mysql folders no longer be there? I figured adding a line to fstab using the same device id twice with two mount points would let me continue to use /mnt/md0 for something other than /home

Would it be possible to create a /mnt/md0/home/ folder in the root of that and mount /dev/md0/home/ to /home instead?

Re: Specifying location of web folders and db storage?

Posted: Fri Oct 13, 2017 6:53 pm
by mehargags
I curently have /mnt/md0/html and /mnt/md0/mysql and those folders house my nginx website data and mysql data
Well honestly, what you wrote doesn't make sense to me. VestaCP would create all sites under /home/<vesta-user>
It will not use or account for any existing files in your mount point, so any sites that were NOT created inside Vesta GUI/CLI will not be seen inside or run by Vesta Config.

>> Just mount your partition to /home
>> Reboot and verify /home remains mounted on the desired partition
>> Move your MySQL storage location and adjust config
>> Start creating all domains/DBs

Hope this clears up things for you.