If the storage capacity of an ApsaraDB RDS for MySQL instance is insufficient, data may fail to be written to the instance. As a result, data loss occurs or even the RDS instance breaks down, which seriously affects business operations. Database Autonomy Service (DAS) supports automatic storage expansion when the storage capacity reaches the threshold that you specify. During the expansion, you do not need to restart the RDS instance, and your services are not affected.
Prerequisites
The following requirements are met:
The RDS instance runs MySQL 8.0 or MySQL 5.7.
The RDS instance runs RDS High-availability Edition or RDS Cluster Edition.
The RDS instance uses cloud disks.
The balance in your Alibaba Cloud account is sufficient.
A service-linked role is created for DAS. For more information, see AliyunServiceRoleForDAS role.
NoteIf the role does not exist, a service-linked role is automatically created for DAS when you enable the automatic storage expansion feature.
Usage notes
When read-only RDS instances are attached to a primary RDS instance and automatic storage expansion is triggered for the primary RDS instance, the system automatically checks the storage capacity of each read-only RDS instance. If the storage capacity of a read-only RDS instance is smaller than the desired storage capacity of the primary RDS instance, the system first expands the storage capacity of the read-only RDS instance. After the storage capacity of each read-only RDS instance is expanded, the system automatically expands the storage capacity of the primary RDS instance. For more information, see [Product changes/Feature changes] Optimization of automatic storage expansion for ApsaraDB RDS for MySQL instances and ApsaraDB RDS for PostgreSQL instances.
Billing rules
The billing rules for automatic storage expansion are the same as the billing rules for manual storage expansion. For more information, see Specification changes.
Procedure
- Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
Use one of the following methods to go to the Autonomous Function Management panel:
In the left-side navigation pane, choose Autonomy Services > Diagnostics. On the page that appears, click the Autonomy Center tab. On the Autonomy Center tab, click Autonomy Service Settings.
In the left-side navigation pane, choose Autonomy Services > Dashboard. On the Dashboard tab of the page that appears, click Autonomy Service Settings.
On the Autonomous Function Settings tab of the Autonomous Function Management panel, enable the autonomy service.
On the Optimization and Throttling tab, select Automatic Space Expansion and configure the following parameters.
Parameter
Description
Available Storage Space
The available storage of your RDS instance. When the remaining storage of your RDS instance is less than or equal to the value that is specified by the Available Storage Space parameter, the system automatically expands the storage capacity of your RDS instance based on the larger value of the following items:
5 GB
15% of the current storage capacity of your RDS instance
For example, if the current storage capacity of your RDS instance is 100 GB, 15% of the current storage capacity is 15 GB, which is larger than 5 GB. Therefore, the storage capacity of the RDS instance is increased by 15 GB when the threshold is reached. After the expansion, the storage capacity of the RDS instance is 115 GB.
Maximum Storage of Automatic Expansion
The maximum storage capacity that is allowed after the storage capacity expansion. The value of this parameter must be greater than or equal to the current storage capacity of your RDS instance.
If your RDS instance uses the enhanced SSD (ESSD) storage type, the maximum value of this parameter can be 32,000 GB.
If your RDS instance uses the standard SSD storage type, the maximum value of this parameter can be 6,000 GB.
NoteThe standard SSD storage type is phased out. We recommend that you upgrade the storage type to ESSD. For more information, see Upgrade the storage type from standard SSDs to ESSDs.
NoteThe minimum interval between consecutive storage expansion events is 10 minutes.
Click OK.
View the details of automatic storage expansion events
- Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the left-side navigation pane, choose Autonomy Services > Diagnostics.
On the Autonomy Center tab, select a time range to view the auto scaling events that occurred in the selected time range.
Click Details in the Auto-Scaling Events section to view the details of auto scaling events.
References
After the storage capacity is expanded, the storage capacity cannot be automatically reduced. If you want to reduce the storage capacity, you must change the instance specifications to manually reduce the storage capacity. For more information, see Change instance specifications.
You can enable the automatic fragment reclamation feature to clear tablespace fragments and reduce storage capacity wastes. For more information, see Use the automatic fragment reclamation feature.
You can use the storage analysis and capacity assessment features to view and analyze the storage usage. For more information, see Use the storage analysis feature and Use the capacity assessment feature for an ApsaraDB RDS for MySQL instance.
For more information about how to automatically expand the storage capacity of RDS instances that run different database engines, see the following topics:
ApsaraDB RDS for PostgreSQL instances: Use the automatic storage expansion feature
ApsaraDB RDS for SQL Server instances: Configure automatic storage expansion for an ApsaraDB RDS for SQL Server instance