Best practise for attached volume to self managed MYSQL DB instance
Hi, i had a dedicated instance and currently running out of diskspace. As I examined that the instance only taking 50% of the CPU power, so I'm thinking that attach a block storage to the instance is more suitable than upgrading the instance. However, I look around the blogs and tutorials, it doesn't provide the detailed overview and steps I need to take to do so, i was wondering after I attached the block storage (and format the block storage) to the instance, MYSQL will auto write to this secondary disk after primary disk (instance SSD) is full?Or anything I need to perform further to do so?
1 Reply
Although we do not have a guide available on how to set up your Block Storage volume to attach to a self managed DB instance, we do have a couple of Community posts where customers have asked similar questions. In the following post that I referenced, this customer was looking to provide additional storage to their /home directory using Block Storage. It was mentioned in order to give /home directory more space on the Volume, you will need to move all of your existing content onto it. I recommend reviewing this information a bit further to get a better idea if this situation applies to you:
MYSQL will auto write to this secondary disk after primary disk (instance SSD) is full
There should be a line in your database's configuration to set the directory it uses. Here's some information on setting the MySQL data directory, as an example:
Additionally, one of my colleague's wrote a detailed post on how you can move your database files to a Block Storage Volume and what to consider.
You may also want to look over our Block Storage product guide to get a better idea on how it works and how to properly attach it:
Before proceeding with any of this information, I recommend taking a Backup of your Linode in case anything should go amiss:
- Backups - Guides(our paid backup service)
- Backing Up Your Data
- Copy a Disk Over SSH
- Back Up A Block Storage Volume.