Insufficient database storage space can prevent data writes, leading to data loss or even database crashes. This severely disrupts normal business operations. PolarDB for MySQL supports automatic storage expansion when usage reaches a threshold. The instance does not require a restart during expansion, so your business remains unaffected.
Applicable scenarios
The automatic storage expansion feature applies to PolarDB for MySQL clusters with a Storage Type of ESSD cloud disk (ESSD PL0, ESSD PL1, ESSD PL2, ESSD PL3, or ESSD AutoPL).
For PolarDB for MySQL clusters with a Storage Type of PSL4 or PSL5, storage space automatically scales based on actual usage. No additional action is required.
Important notes
When automatic expansion is enabled and storage runs low, the system performs an elastic upgrade. During this process, you cannot create accounts or perform other operations.
-
Ensure your Alibaba Cloud account has no overdue payments and sufficient balance to cover expansion costs. Otherwise, expansion fails.
-
Automatic expansion triggers when any storage resource (current capacity, current Inode count, or current Blktag count) falls below its threshold. The specific conditions are:
-
Storage space is less than 120 GB and remaining resources are below 50%.
-
Storage space is at least 120 GB but less than 1 TB and remaining resources are below 30%.
-
Storage space is at least 1 TB but less than 10 TB and remaining resources are below 20%.
-
Storage space exceeds 10 TB and remaining resources are below 10%.
-
-
Each automatic expansion increases storage by 20 GB or 15% of current storage space—whichever is larger—with a maximum increase of 100 GB per expansion. For example, if current storage is 200 GB, each expansion adds 30 GB. If current storage is 100 GB, each expansion adds 20 GB.
-
You can disable automatic expansion at any time after instance creation. In the console, go to Automatic expansion configuration and turn off the Enable Auto Scaling.
-
Automatic storage expansion causes no service interruptions.
Prerequisites
Before enabling automatic storage expansion, obtain the DAS service-linked role. For more information about the DAS service-linked role, see DAS service-linked role.
-
Use your Alibaba Cloud account (primary account) to go to the Resource Access Management (RAM) console and open the list.
-
Check whether a service-linked role named AliyunServiceRoleForDAS already exists. To do this, enter
AliyunServiceRoleForDASin the search box and look for the role.-
If it exists, skip the rest of this check.
-
If it does not exist, continue with the following steps.
-
-
Click Create Role. On the Create Role page that opens, click Create Service-linked Role in the upper-right corner.
-
On the Create Service-linked Role page, set Trusted Alibaba Cloud Service to AliyunServiceRoleForDAS, then click Create Service-linked Role to complete the process.
Enable automatic expansion
Enable automatic expansion during cluster purchase
If you are purchasing a Standard Edition cluster for the first time, configure automatic expansion on the purchase page as follows.
-
Log on to the PolarDB console. In the navigation pane on the left, click Clusters, then click Create Cluster.
-
Customize your cluster’s basic settings according to the options on the page.
NoteFor requirements on basic cluster configuration, see Applicable scenarios.
-
In the Storage section, turn on the Automatic Storage Scaling toggle and set the Maximum Storage (default: 64000 GB).
-
After completing the above settings, review your cluster configuration, the actual payment amount, and the Terms of Service on the page. If everything is correct, click Buy Now.
Enable automatic expansion after cluster purchase
If you want to enable automatic expansion for an existing Standard Edition cluster, configure it in the console as follows.
-
Log on to the PolarDB console. In the navigation pane on the left, click Clusters, select the cluster’s region, and click the target cluster ID to open its details page.
-
In the Distributed Storage section, click the Enable automatic expansion button.
-
In the Auto Scaling Settings window, turn on the Enable Auto Scaling and set the Maximum Storage Capacity (default: 64000 GB). Click OK.
Related content
Full storage is often caused by temporary files, log files, or data files. For solutions, see Data management and cleanup.