Second disk used for all website and SQL data - How to set up?

6 posts / 0 new
Last post
#1 Mon, 08/15/2016 - 16:19
jmunjr

Second disk used for all website and SQL data - How to set up?

Hi I am running an Azure VM with Cnetos 7.2. By default we get a really small OS drive and it is recommended to use separate data disks for everything else. I have four disks in a RAID 0 config (Azure has redundancy built in).

As far as I know the only big sources of data I'll have on my system will be websites and databases(MySQL). So, what is the most ideal way to have my server/Virtualmin use the data drive to store web and data? Symlinks? Another option? Also can you think of any other folder or data sources that should be moved?

Any help is appreciated. I am certain someone has done this since Azure is pretty popular. I have searched for solutions but I do not know what the best options is for me.

Thank you

Mon, 08/15/2016 - 16:42
jmunjr

Hmmm, it seems making the data /home is the best way to go and then changing the default data path for MYSQL should do it? Does anyone agree?

Is there anything else that should concern me or I need to give attention?

Wed, 08/17/2016 - 06:34
hescominsoon

you need two different raid sets at vm creation to be able to present two drives to the installer. Then run a custom install. you would have to do a custom setup and then manually partition things out. also since all of the drives are in raid 0 you are only presenting one drive to the os.

Wed, 08/17/2016 - 11:13 (Reply to #3)
jmunjr

I don't think anything needs to be custom. You can move the /home directory to another drive (set up as RAID) and move the mount for /home to that new drive. Most dataabase stuff is stored in /var but for MySQL and I imagine others, you can tell MySQL where to store data and can store it in a folder inside /home.

I think you could use symlinks for /var as well, but I am not sure. Or if you have the resources mount /var onto another drive/array as well, but if you are doing RAID 0 performance would be better if you used all drives in on RAID 0 array, but be sure you have some sort of fault tolerance in place.

Wed, 08/17/2016 - 15:15 (Reply to #4)
Joe
Joe's picture

You're right. There's nothing complicated about just mounting /home on another disk, and no reinstall of anything is needed.

The only issue would be quotas; databases, if they stay in /var wouldn't share quota space with /home.

But, realistically, a lot of deployments don't need quotas, or don't need them to apply to databases, but moving databases to /home would resolve that. I think Virtualmin has some logic to account for database size even if they don't participate in quotas, but don't hold me to that recollection; it's been a while since I've spent time messing with quotas in Virtualmin.

--

Check out the forum guidelines!

Wed, 08/17/2016 - 15:41
jmunjr

Oh yeah I didn't think about quotas but I am in the group you mentioned. Everything I use is personal so quotas aren't an issue. Thanks!

Topic locked