Best practices for local disks

Updated at:

Select local disks for high I/O performance and mitigate their data loss risks with redundancy and backup strategies.

Overview

Local disks are attached to the physical machines that host ECS instances. They provide high random IOPS, high throughput, low latency, and cost-effectiveness. Instances with local disks suit workloads that demand high storage I/O performance and have a high-availability architecture at the application layer. See Local disks.

Risks

A local disk is attached to a single physical machine without a distributed multi-copy mechanism. Data durability depends on the reliability of that physical machine. Data loss can occur when the local disk fails, the host machine fails, or the disk is mishandled. Store only temporary data on local disks.

Cloud disks use a distributed triplicate mechanism to ensure data durability during hardware failures. If your application lacks a multi-node data redundancy architecture, use cloud disks instead.

Best practices

Select instance types

For big data and heavy-load database workloads, instances with local disks, such as those in the i4, d3c, and d3s instance families, offer cost and latency advantages. Use these instances when your workload demands high storage I/O performance and has a high-availability architecture at the application layer. For big data clusters, use a deployment set to distribute instances across different physical servers and reduce the impact of a damaged local disk.

If your application lacks a high-availability architecture, use other instance types. See Instance family overview and Instance type selection.

Back up a local disk

Back up data from a local disk to a Cloud Backup repository, or periodically back up data to OSS, NAS, or a data disk with an automation script. See Back up local disk files.

Important

If your application lacks a data reliability architecture, back up your data.

Use deployment sets to improve availability

Implement data redundancy at the application layer to ensure data availability.

Deployment sets distribute ECS instances across different physical servers for high availability and disaster recovery. See Deployment sets.

Migrate data from a local disk to a cloud disk

To improve data durability, migrate from local-disk instances to cloud-disk instances. Cloud disks use a distributed triplicate mechanism to protect data during hardware failures. You can also create snapshots to back up cloud disk data.

Server Migration Center (SMC) performs a full data backup of local-disk instances by migrating them to Alibaba Cloud and creating image backups. See What is Server Migration Center.

Note the following when migrating data:

  • SMC charges only for ECS resources used during migration.

  • To retain the public IP address of the source instance, convert it to an Elastic IP Address (EIP). Disassociate the EIP from the source instance, then associate it with the destination instance.

  • To retain the private IP address of the source instance, create the destination instance in the same Virtual Private Cloud (VPC) and vSwitch. Then change the private IP address of the new instance to match the source, either in the ECS console or by specifying it through an API operation.

  • Select the transferring data over an internal network mode and enable block copy to maximize migration efficiency.

  • Enable automatic incremental synchronization in SMC to generate image replicas on a regular basis.

  • SMC does not interfere with or modify the source instance during migration. It uses only a portion of CPU, memory, and bandwidth resources. To ensure data consistency for applications such as databases, stop the applications before migrating and backing up data.

Handle local disk damages

If a local disk is damaged, Alibaba Cloud triggers a system event and sends notifications with recommended actions. Perform O&M based on the scenarios shown in the following figure. See O&M scenarios and system events.

image