Disk volumes

更新时间:
复制 MD 格式

A disk is a non-shared, low-latency, and highly reliable block storage device. Disks are ideal for applications that require high I/O performance and low latency but not shared data access, such as databases. ACK lets you mount various types of disks, such as ESSD AutoPL disks and ESSDs, to pods as volumes for persistent storage.

Disk selection

Disks are ideal for the following use cases:

  • Applications that require high disk I/O but not shared data access, such as MySQL or Redis.

  • High-speed log writing.

  • Persistent storage for data that must persist beyond the pod lifecycle.

Select a disk type based on your requirements for features, performance, and cost.

Note

Standard SSDs, ultra disks, and basic disks are legacy disk types that are being phased out in some regions and availability zones. Use ESSD PL0 or ESSD Entry disks to replace ultra disks and basic disks, and use ESSD AutoPL disks to replace standard SSDs.

Disk features and use cases

The following table describes the features and use cases of different disk types. For more information, see Block storage overview.

Type

Features

Use cases

ESSD AutoPL disk

  • Decouples capacity from performance

  • Supports pre-configured disk performance

  • Supports performance bursting

  • All scenarios suitable for ESSDs

  • Fixed disk capacity with high performance requirements

  • Workloads with significant fluctuations and frequent peaks that require burst performance

Regional ESSD

  • High IOPS

  • Cross-availability zone redundancy

  • All scenarios suitable for ESSDs

  • Cross-availability zone disaster recovery for databases

  • Cross-availability zone container deployments

  • Self-managed or cloud-based SaaS services

ESSD

  • High IOPS

  • Low latency

Latency-sensitive applications or I/O-intensive workloads, such as:

  • Large-scale OLTP databases

  • NoSQL databases

  • Distributed logging with Elasticsearch

ESSD Entry disk

Note

ESSD Entry disks can only be attached to general-purpose (U-series) and economy (e-series) instance families.

  • High IOPS

  • Low latency

  • Development and testing workloads

  • As system disks

elastic ephemeral disk

  • High performance

  • Cost-effective

Temporary data storage, such as:

  • Intermediate data from computations, cached data, and temporary files

  • Temporary storage for high-performance tasks

Disk performance

The performance of a disk varies by type. Key performance metrics include IOPS, throughput, and access latency.

Billing

Disks used as volumes must be pay-as-you-go. Subscription disks cannot be mounted to pods. You can purchase a Storage Capacity Unit (SCU) to reduce your disk usage costs.

Note

When you convert an ECS instance from pay-as-you-go to subscription, do not select Convert disk to subscription. Subscription disks are incompatible with container application restarts, which can disrupt your services. For more information, see Billing FAQ.

Limitations

  • Disks provide non-shared storage. A disk without multi-attach enabled can be mounted to only one pod at a time. For more information about multi-attach, see Use multi-attach and reservation for NVMe disks.

  • Disks can only be mounted to pods within the same availability zone. Cross-availability zone mounting is not supported.

  • Not all disk types are compatible with all ECS instance types.

    When using a disk volume, ensure the node's instance type supports the selected disk type. For more information about the compatibility between disk types and ECS instance types, see Instance families.

Procedures

Actions

Description

Related topics

Mount and use a disk volume

  • Statically provisioned volume

    Create a persistent volume (PV) from an existing disk and bind it directly to a persistent volume claim (PVC). This method is suitable for scenarios where you already have a disk.

  • Dynamically provisioned volume

    Define a StorageClass to dynamically create a disk and bind it to a PVC. The system automatically creates and binds the disk based on the PVC and StorageClass configurations. This automated method is flexible and does not require you to create a disk in advance.

Expand a disk volume

If your application data grows and storage becomes insufficient, you can expand the disk volume to meet your needs.

Expand a disk volume

Change the disk type

If the performance or capacity of your current disk volume no longer meets your business requirements, you can change the disk type.

For example, if you initially attached a standard SSD but later require higher IOPS, you can upgrade the disk to an ESSD.

Change the disk type

Backing up disk data with snapshots

  • Single disk

    This method integrates the disk's native backup and recovery mechanism (snapshots) with Kubernetes services. You can use a VolumeSnapshot resource to create a snapshot of a disk. You can restore data by using the DataSource feature of a PVC.

  • Multiple disks

    Creating individual snapshots for multiple disks can lead to data inconsistency. By using group snapshots, you can create crash-consistent backups of multiple disks at once.

Encrypting data stored on a disk

When you use the disk encryption feature, data is automatically encrypted before it is written to the disk and decrypted when it is read. Disk encryption is suitable for applications with high security or compliance requirements. This feature protects data privacy without requiring you to build and maintain a key management infrastructure.

Restoring disk data with an instant access snapshot

If a disk is accidentally deleted, you can use the instant access snapshot feature for ESSDs to quickly restore data.

Best practices for disk data security

Related topics

  • ACK uses the CSI component to create, mount, and unmount disk volumes. For more information, see Manage CSI components.

  • For shared storage across multiple pods or availability zones, use NAS volumes.

  • For troubleshooting issues with disk volumes, see the Disk volume FAQ.