MySQL .ibd file has grown to more than 3 TB and my RedHat box can no longer support adding more disk spaces.
Questions
- How can I scale database storage ?
- What best practices can resolve this issue ?
Note:I use one .ibdfile per table and have a couple of huge tables.
If you are just storing data, your data mount for
/var/lib/mysqlshould be 5TB SATA drives. If your application is write heavy, your data mount for/var/lib/mysqlshould be 5TB SAS drives RAID10.If upgrading disks is out of the question, you need to do periodic table defragmentation in one of three(3) ways:
ALTER TABLE myinnodbtable ENGINE=InnoDB;OPTIMIZE TABLE myinnodbtable;You can perform this defragmentation manually as follows:
Option 3 does not work if the InnoDB table has constraints because constraints will disappear.