All Products
Search
Document Center

Elastic Compute Service:FAQ

Last Updated:May 09, 2024

This topic provides answers to frequently asked questions about Elastic Block Storage (EBS) devices.

What is an SCU?

SCUs are subscription storage resource plans that can be used to offset the pay-as-you-go bills of storage resources such as disks. Compared with disks purchased together with subscription Elastic Compute Service (ECS) instances, SCUs used together with pay-as-you-go disks offer a better combination of cost-effectiveness and flexibility. For more information, see Overview of SCUs.

Which EBS devices can use SCUs?

SCUs can be used to offset the pay-as-you-go bills of eligible storage resources. Take note of the following items:

  • SCUs can be used to offset the bills of enterprise SSDs (ESSDs), standard SSDs, ultra disks, and basic disks. SCUs cannot be used to offset the bills of local disks.

  • SCUs can be used to offset the bills of Capacity NAS file systems and Performance NAS file systems in Apsara File Storage NAS. SCUs cannot be used to offset the bills of Extreme NAS file systems or Infrequent Access (IA) storage media.

  • SCUs can be used to offset the bills of snapshots.

  • SCUs can be used to offset bills of OSS Standard, Infrequent Access, and Archive storage classes.

Can an SCU be used alone?

No, SCUs cannot be used alone. They must be matched to and used with pay-as-you-go disks to offset bills.

What rules apply when you use SCUs?

SCUs offset the pay-as-you-go bills of disks based on a variety of deduction factors. For more information, see Usage rules.

How are SCUs billed?

SCUs are billed based on their capacity. SCU capacity prices vary with regions. For information about SCU capacity prices in each region, visit the Pricing tab of the Storage Capacity Unit product page.

What is an ESSD?

An ESSD is an ultra-high performance disk provided by Alibaba Cloud. ESSDs use 25 Gigabit Ethernet and remote direct memory access (RDMA) technologies to deliver up to 1 million random read/write IOPS and reduce one-way latency. For more information, see ESSDs.

What specifications do ESSDs have?

ESSDs are categorized into different performance levels and have different specifications. For information about ESSD performance levels, see ESSDs.

The performance of a storage device is closely related to the capacity of the device. A storage device that has a larger capacity provides higher data processing capabilities. All ESSDs have the same I/O performance per unit of capacity. However, the performance of ESSDs increases linearly with its capacity until the maximum performance per disk at the PL is reached.

Performance level

ESSD capacity range (GiB)

Maximum IOPS

Maximum I/O throughput (MB/s)

PL0

1~65,536

10,000

180

PL1

20~65,536

50,000

350

PL2

461~65,536

100,000

750

PL3

1,261~65,536

1,000,000

4,000

What are the similarities and differences between ESSDs, standard SSDs, and ultra disks?

  • Similarities: All three categories of disks are based on a distributed EBS architecture, provide high reliability and scalability, and support snapshots and data encryption.

  • Differences: ESSDs have the best performance of the three disk categories. For more information, see ESSDs and Block storage performance.

How is the performance level of an ESSD measured?

The performance level of an ESSD is proportional to its storage capacity. An ESSD that has a larger capacity delivers better performance. ESSDs have better performance than standard SSDs. For more information, see ESSDs.

How do I test the performance of an ESSD?

You can use fio (flexible IO tester) to perform a stress test on an ESSD. For more information, see Test the IOPS performance of an ESSD.

What is the relationship between the storage performance of an ESSD and the storage performance of the instance to which the ESSD is attached?

The storage I/O performance of specific instances is proportional to the specifications of instance types. The higher specifications an instance type has, the higher IOPS and throughput the instance type delivers.

For example, when you create an instance of the g7se storage-enhanced general-purpose instance family and attach ESSDs to the instance, the following situations may occur:

  • If the total performance of ESSDs does not exceed the storage I/O performance of the instance type, the total performance of the ESSDs prevails.

  • If the total performance of ESSDs exceeds the storage I/O performance of the instance type, the storage I/O performance of the instance type prevails.

    Assume that you create a 16 GiB instance of the ecs.g7se.xlarge instance type that can deliver up to 60,000 IOPS. If you attach a 2 TiB ESSD to the instance and the ESSD can deliver up to 101,800 IOPS, the maximum IOPS of the instance is 60,000, instead of 101,800.

For information about the performance and specifications of the g7se instance family, see Overview of instance families.

How are ESSDs billed?

ESSDs support the subscription and pay-as-you-go billing methods. For more information, visit the Pricing tab of the Elastic Compute Service product page.

Which instance families do ESSDs support?

For information about the instance families that ESSDs support, see Overview of instance families.

What tools can I use to test the performance of EBS devices?

For information about how to test the performance of EBS devices, see Test the performance of block storage devices.

Why does my instance go down when I use fio to test the I/O performance of the instance?

You can use fio to test the I/O performance of an instance by testing raw disk partitions or file systems. If you perform this test on raw disk partitions, the metadata of the file systems in the raw disk partitions may be damaged. As a result, you cannot access files in the partitions and the instance even goes down. This problem does not occur when you use fio to perform the test on file systems.

What must I consider when I select zones to create disks and then attach the disks to ECS instances?

A pay-as-you-go disk can be attached only to an ECS instance that resides within the same zone.

  • For high-availability applications, we recommend that you create data disks in different zones and attach the disks to ECS instances in those zones.

  • For low-latency applications, we recommend that you create data disks in the same zone as ECS instances and attach the disks to the ECS instances.

What are the common operations that can be performed on a disk?

For information about the common operations that you can perform on a disk, see the "Related operations" section in Disks.

How do I query the usage and free space of EBS devices?

You can log on to an ECS instance to query the usage and free space of EBS devices on the instance. You cannot query the usage and free space of EBS devices by using the ECS console or by calling ECS API operations.

Can I shrink a disk?

No, disks cannot be shrunk. If you want to shrink a disk that you purchased, we recommend that you create a disk of your desired size and attach it to the same instance as the original disk. Then, copy the data stored on the original disk to the new disk and release the original disk.

How do I release a subscription disk that has not expired?

Alibaba Cloud subscription data disks cannot be released before they expire. To release a subscription data disk, you must change its billing method to pay-as-you-go. Before you release the resulting pay-as-you-go data disk, make sure that you have backed up all important data stored on it. For more information, see Change the billing methods of a disk and Release a disk.

Note

After the billing method of a data disk is changed from subscription to pay-as-you-go, you are billed for the data disk on an hourly basis. One hour after the disk is released, you are no longer charged for it. After the disk billing method is changed from subscription to pay-as-you-go, the refund amount is displayed in the ECS console. The coupons that have been used are not refundable.

What is I/O optimization? Can I upgrade an existing ECS instance to an I/O optimized instance?

I/O optimization provides better network capabilities and storage performance for instances and disks. For example, you can optimize the storage performance of a standard SSD by attaching the standard SSD to an I/O optimized instance.

You can call the ModifyInstanceSpec and ModifyPrepayInstanceSpec operations to upgrade non-I/O optimized instances to I/O optimized instances.

How does Alibaba Cloud deal with EBS resource contention?

Alibaba Cloud EBS is a multi-tenant storage service in which performance standards are defined based on instance types and disk specifications. For example, disks are provided in multiple categories such as ESSDs, standard SSDs, and ultra disks and have different performance specifications. You can purchase disks of different categories to meet your data storage needs. You can also resize disks or change their categories to modify disk performance specifications.

You can use CloudMonitor or CloudLens for EBS to monitor disks and collect their performance data. Then, you can determine based on the collected data whether the disks suit your business requirements. For more information about CloudMonitor and CloudLens for EBS, see Cloud service monitoring and View disk information in the EBS Lens console.

Alibaba Cloud EBS properly allocates infrastructure to provide storage and prevent resource contention and allows disk performance data to be monitored on an ongoing basis. When hardware fails or resource contention occurs, Alibaba Cloud schedules resources or makes repairs based on the damaged condition of infrastructure.

What is the I/O performance of a standard SSD?

For more information, see Block storage performance.

What scenarios are standard SSDs ideal for?

Standard SSDs provide high performance and high reliability that make them ideal for I/O-intensive applications with high requirements on data reliability, such as MySQL, SQL Server, Oracle, PostgreSQL, and other small and medium-sized relational databases. They are also ideal for small and medium-sized development and testing environments that require high data reliability.

Can I replace a basic disk with a standard SSD?

No, standard SSDs cannot be used to replace basic disks because standard SSDs use SSDs as physical storage media.

How do I purchase a standard SSD? What are the pricing options for I/O optimized instances and standard SSDs?

For more information about pricing, visit the Pricing tab of the Elastic Compute Service product page.

Can I upgrade a standard SSD after I purchase it?

Yes, you can upgrade or resize your standard SSDs. For more information, see Overview.

Why is an error returned when I attempt to mount the partitions of a standard SSD to an I/O optimized Linux instance?

In the Linux operating system, the mount points for standard SSDs are in the /dev/vd* format, and the mount points for basic disks are in the /dev/xvd* format. If you specify the mount point in the /dev/xvd* format in a command to mount a standard SSD partition, an error is returned. You must specify the mount point in the /dev/vd* format.

What must I be aware of before I add the mount information of basic disks or standard SSDs to Linux instances?

When you attach a data disk to a Linux instance and partition and format the disk, be aware that the device names of data disks for I/O optimized instances and those for non-I/O optimized instances are different. By default, the device names of data disks are automatically assigned based on the following naming conventions:

  • I/O optimized instances:

    • The device names of data disks that are attached by using the Non-Volatile Memory Express (NVMe) protocol are in the /dev/nvmeXn1 format. Examples: /dev/nvme1n1, /dev/nvme2n1, and /dev/nvme3n1. For information about disks that support the NVMe protocol, see NVMe disks.

    • The device names of data disks that are attached not by using the NVMe protocol are in the /dev/vd[b-z] format. Examples: /dev/vdb, /dev/vdc, and /dev/vdd.

  • Non-I/O optimized instances: The device names of data disks that are attached to non-I/O optimized Linux instances are in the /dev/xvd[b-z] format. Examples: /dev/xvdb, /dev/xvdc, and /dev/xvdd.

Important

We recommend that you use a UUID to reference each new partition in /etc/fstab. The device names of other disks may change due to operations such as releasing a disk. If the device name of a data disk is referenced in /etc/fstab, your stored data may be affected if the device name changes.

If invalid information is specified in the mount -a command for a disk, the disk cannot be attached. To resolve the issue, perform the following steps:

  1. Run the fdisk -l command to view the information of the data disk.

  2. Check whether the information of the data disk added to /etc/fstab is the same as that you viewed.

    Note

    Do not add duplicate mount information because this may cause a system startup failure.

  3. Run the vim command to modify the /etc/fstab file.

  4. Comment out or delete invalid information and add valid mount information.

  5. Run the mount -a command to check whether the disk is attached.

For more information, see Initialize a data disk whose size does not exceed 2 TiB on a Linux instance.

What is a device name (mount point)?

A device name (mount point) is the location of an ECS disk on the disk controller bus. The selected device name matches the disk device number in Linux. The selected device name matches the disk sequence number in the disk manager of Windows.

What is an independent disk?

An independent disk is a pay-as-you-go data disk that you separately purchase. An independent disk can be attached to or detached from an ECS instance that resides within the same zone. You must attach an independent disk to an instance, and partition and format the disk before you can use it. For more information, see Create a disk.

Can I attach a disk to multiple ECS instances?

No, a disk cannot be attached to multiple ECS instances. A disk can be attached to only a single ECS instance that resides within the same zone.

Do I need to partition and format a pay-as-you-go disk after I purchase and attach it to an ECS instance?

Yes, you must attach a pay-as-you-go disk to an ECS instance, and then partition and format the disk after you separately create the disk. For more information, see Initialize a data disk whose size does not exceed 2 TiB on a Linux instance and Initialize a data disk up to 2 TiB in size on a Windows instance.

Why am I unable to find the data disk that I purchased for an ECS instance?

How many disks can be attached to a single ECS instance?

Up to 64 data disks can be attached to an ECS instance. The maximum number of disks that can be attached to an instance varies based on the instance type. For more information, see Overview of instance families.

Note

When you create an instance, you can attach only one system disk and up to 16 data disks to the instance. If the instance requires additional data disks, attach the data disks after you create the instance. The number of disks that can be attached to an instance varies based on the instance type. You can call the DescribeInstanceTypes operation to query the number of disks that can be attached to an instance.

Why am I unable to find the desired ECS instance when I attempt to attach a disk?

Check whether the ECS instance is released. If the ECS instance is not released, make sure that it resides within the same zone as the disk.

Can I attach a disk to an ECS instance that resides within a different zone?

No, a disk cannot be attached to an ECS instance that resides within a different zone. A pay-as-you-go disk can be attached only to an ECS instance that resides within the same zone.

Will data in a data disk be lost when I detach the disk?

  • In Windows, we recommend that you stop all read and write operations on all file systems of the disk to ensure data integrity. Otherwise, the data that is being read or written will be lost when you detach the disk.

  • In Linux, you must first log on to the ECS instance and run the umount command on the disk. Then, log on to the ECS console to detach the disk.

Can I detach system disks?

Yes, system disks can be detached. For more information, see Detach or attach a system disk.

How is a separately created pay-as-you-go data disk billed?

Pay-as-you-go data disks are billed on an hourly basis. If your account balance is insufficient, the services provided by the data disks are suspended.

I attached a separately created disk to an ECS instance. Why is the disk released when the instance is released?

This is because you have configured the disk to be released along with the instance. You can change this configuration by using the ECS console or by calling an API operation. For more information, see Release a disk.

Can I attach a separately created pay-as-you-go data disk to a subscription instance?

Yes, separately created pay-as-you-go data disks can be attached to subscription instances.

Can I detach a data disk from a subscription instance?

No, data disks cannot be detached from subscription instances. Data disks expire at the same time as the subscription instances to which they are attached, and are released together with the instances. To release a subscription data disk, you can convert it into a pay-as-you-go data disk and then detach and release it. For information about how to change the billing method of disks, see Change the billing methods of a disk.

I changed the configurations of an instance when I renewed the instance. Can I change the billing method of a subscription disk on the instance to pay-as-you-go within the remaining time of the current subscription period?

No, the billing method of the disk cannot be changed within the remaining time of the current subscription period. You can change the billing method of the disk from subscription to pay-as-you-go only by changing the configurations of the instance after the current subscription period ends.

When I delete a disk, will its snapshots also be deleted?

If you have enabled the Delete Automatic Snapshots While Releasing Disk feature for the disk, the automatic snapshots of the disk are deleted when you delete the disk. However, the manual snapshots are retained. You can change this setting any time. For more information, see Delete automatic snapshots while releasing a disk.

Why are some automatic snapshots on my disk missing?

When the number of snapshots reaches the upper limit, the earliest automatic snapshots are automatically deleted but manual snapshots are not affected.

Note

The automatic snapshot policy that is applied to a disk can be executed only after the disk is attached to an instance.

Can I use a snapshot to create an independent disk?

Yes, snapshots can be used to create independent disks. You can use an existing snapshot to create an independent pay-as-you-go disk. For more information, see Create a disk from a snapshot.

I cannot access the data in a Linux data disk because an error occurred when I attached the disk. What do I do?

Perform the following operations to troubleshoot the error for the Linux operating system:

  1. Find the data disk and use one of the following methods to check whether the disk is attached to the corresponding ECS instance:

    • View the disk in the ECS console. For more information, see View the monitoring data of a disk.

    • Log on to the instance and run the fdisk -l command to check whether the data disk partition information is correct. Run the df -h and mount | grep "<devpath>" commands to view mount information.

  2. Run the cat command to view the /etc/fstab file and check whether two disks are mounted on the same directory.

    • If two disks are mounted on the same directory, the second disk replaces the first disk. This causes data of the first disk to become inaccessible. We recommend that you mount one of the disks on a different directory.

    • If two disks are mounted on different directories but their mount information shows that they reside within the same directory, run the ll command to check whether a connection exists between the two directories. If a connection exists between the two directories, run the mkdir command to create a directory, and attach one of the disks to the new directory. Then, check whether the data can be accessed.

What do I do if data is lost after I restart a Linux instance?

  • Problem description: All data in a directory such as /alidata is lost after you restart a Linux instance.

  • Cause: After you run the df -h command, the command output shows that none of the data disk partitions is mounted to the directory.

  • Solution: In this example, the /dev/vdb1 partition of a data disk is used. The data disk is attached to an I/O optimized instance by using a non-NVMe protocol. If a data disk is attached to an I/O optimized instance by using the NVMe protocol, the device name of the disk is displayed in the /dev/nvmeXn1 format. If a data disk is attached to a non-I/O optimized instance, the device name of the disk is displayed in the /dev/xvd[b-z] format. Perform the following operations based on actual scenarios:

    1. Run the fdisk -l command to view the data disk partitions that are not mounted.

    2. Run the mount /dev/vdb1 /alidata command to mount the data disk partitions to the /alidata directory.

    3. Run the df -h command to check whether the data disk partitions are mounted to the directory.

    4. (Optional) Configure the /etc/fstab file for the system to automatically mount the disk partitions on next system startup to prevent this issue.

If I re-initialize a disk, are my snapshots retained?

Yes, both manual and automatic snapshots of the disk are retained.

After I restarted the instance or re-initialized the system disk, data disks of a Linux instance cannot be found. What do I do?

  • Problem description: After you restart a Linux instance or re-initialize the system disk, you log on to the instance and run the df -h command. The command output shows that no data disks are found.

  • Cause:

    • Restart of an instance: Mount information was not written to the /etc/fstab file before you restart the instance. As a result, data disks are not automatically attached after the instance restarts.

    • Re-initialization of the system disk: The /etc/fstab file is reset when the system disk is re-initialized. As a result, data disks are not automatically attached on instance startup.

  • Solution:

    In this example, the /dev/xvdb1 partition of a disk is used. The disk is attached to a non-I/O optimized instance. If a data disk is attached to an I/O optimized instance by using a non-NVMe protocol, the device name of the disk is displayed in the /dev/vd[b-z] format. If a data disk is attached to an I/O optimized instance by using the NVMe protocol, the device name of the disk is displayed in the /dev/nvmeXn1 format. Perform the following operations based on actual scenarios:

    1. Run the mount /dev/xvdb1 command to remount the data disk partitions.

    2. Run the mount command to check the file system type of the /dev/xvdb1 partition.

    3. Assume that the /dev/xvdb1 partition uses the ext3 file system. Run the following command to write the partition mount information to the /etc/fstab file:

      echo '/dev/xvdb1 /data ext3 defaults 0 0' >> /etc/fstab
    4. Restart the instance in the ECS console.

How do I re-attach data disks after I re-initialize the system disk of a Linux instance?

After you re-initialize the system disk of a Linux instance, data in the data disks remains unchanged, but the mount information of the data disks is lost. Assume that before the system disk is re-initialized, a data disk partition mounted to the instance is named /dev/vdb1, and its mount point is named /InitTest. Perform the following operations to remount the data disk partition after you restart the Linux instance:

  1. Run the mount command to view the mount information of the data disk.

    The command output does not contain the information of /dev/vdb1.

  2. Run the fdisk -l command to view the information of data disk partitions.

  3. Run the cat /etc/fstab command to view the original mount point name of the /dev/vdb1 data disk partition.

  4. Run the mkdir /InitTest command to recreate the mount point for the data disk partition.

    For the /dev/vdb1 data disk partition, the new mount point name must be the same as the original one.

  5. Run the mount /dev/vdb1 /InitTest command to remount the data disk partition.

  6. Run the df -h command to check whether the data disk partition is mounted.

  7. Perform the following operations to check whether the/dev/vdb1 data disk partition can be automatically mounted:

    1. Run the umount /dev/vdb1 command to unmount the /dev/vdb1 data disk partition.

    2. Run the mount command to check mount information.

      If the command output does not contain the information of /dev/vdb1, the partition is unmounted.

    3. Run the mount -a command to automatically mount /dev/vdb1.

    4. Run the mount command to check mount information.

      If the command output contains the information of /dev/vdb1, the partition is automatically mounted.

What are the differences between a system disk re-initialization operation and a system disk (operating system) replacement operation?

The following table describes the differences.

Item

After the system disk of an instance is re-initialized

After the system disk (operating system) of an instance is replaced

Features

The instance is restored to the initial state when it was created. The operating system of the instance remains unchanged before and after initialization.

The operating system of the instance is changed.

Impacts on the system disk

  • The original system disk of the instance is not released.

  • The system disk of the instance is restored to the initial state when it was created and the applications installed and data generated after the instance was created are deleted. We recommend that you back up data.

  • The ID of the system disk, the category of the system disk, and the IP addresses of the instance remain unchanged.

  • The original system disk is released.

  • All data stored on the original system disk is deleted. We recommend that you back up data.

  • The ID of the system disk is changed. The category of the system disk, the IP addresses of the instance, and the media access control (MAC) addresses of the elastic network interfaces (ENIs) that are attached to the instance remain unchanged.

Impacts on the data disks

The data disks are not affected.

The data disks are not affected.

Impacts on snapshots

  • The snapshots created for the system disk can be used to roll back the system disk.

  • The manual and automatic snapshots created for the system disk are retained.

  • If an automatic snapshot policy is applied to the system disk, the policy remains in effect for the disk.

  • Snapshots of the original system disk cannot be used to roll back the new system disk, but can be used to create custom images.

  • The manual snapshots of the original system disk are not released.

  • If Delete Automatic Snapshots While Releasing Disk is enabled for the original system disk, the automatic snapshots of the disk are automatically released along with the disk. If Delete Automatic Snapshots While Releasing Disk is disabled for the original system disk, the automatic snapshots of the disk are not automatically released until they expire.

  • The automatic snapshot policy applied to the original system disk becomes invalid, and you can configure an automatic snapshot policy for the new system disk based on your business requirements.

Charges

You are not charged for initializing the system disk. The operating system of the instance remains unchanged before and after initialization so that billable items remain unchanged.

You are not charged for replacing the operating system of an instance but are charged for the resources that are used in the following scenarios:

  • If the replacement image is a paid image, you are charged for the image. For more information, see Images.

  • If you extend the system disk when you replace the operating system of an instance, you are charged for the disk capacity increment. For more information, see Block storage devices.

Are my snapshots retained if I replace a system disk?

This depends on how the snapshots are created. Manual snapshots are retained, but automatic snapshots are deleted if the Delete Automatic Snapshots While Releasing Disk feature is enabled.

Note

After a system disk is replaced, the disk ID changes. You cannot use the snapshots of the original system disk to roll back the new system disk.

What must I be aware of before I replace a system disk?

We recommend that you create snapshots of the system disk before you replace it. Make sure that the new system disk has a free space of 1 GiB or larger. If the free disk space is insufficient, the instance may not start normally after you replace the system disk.

For information about system disk prices, see the Pricing tab of the Elastic Compute Service product page.

How do I resize a system disk?

You can resize a system disk by using the ECS console or by calling the ResizeDisk operation.

Can I shrink a disk after I resize it by extending its capacity?

No, disks cannot be shrunk after they are extended. An extended disk cannot be shrunk after the new capacity takes effect. We recommend that you properly plan your storage capacity. However, you can migrate to another disk that is smaller in size by using Server Migration Center (SMC). For more information, see Shrink disks.

What EBS devices can be resized when they are used as system disks? Do regional limits apply to this operation?

ESSD AutoPL disks, ultra disks, standard SSDs, and ESSDs can be resized when they are used as system disks. You can resize system disks in all regions.

Can the system disks of both subscription and pay-as-you-go ECS instances be resized?

Yes, the system disks of both subscription and pay-as-you-go ECS instances can be resized.

What is the capacity range of a system disk?

The capacity range of a system disk varies based on the operating system. For more information, see Overview.

I changed the configurations of an instance when I renewed the instance. Can I specify a new size for the system disk when I replace the system disk?

After you downgrade the configurations of a subscription instance when you renew the instance, you cannot resize its system disk until the new billing cycle starts.

How do I create a disk from a snapshot of a data disk on an ECS instance to resize the data disk without data loss?

If a data disk attached to an ECS instance cannot be resized without data loss due to a disk error, you can purchase a pay-as-you-go disk to temporarily store data from the original data disk, and then format the original data disk. Perform the following operations:

  1. Create a snapshot for the current data disk (original data disk). For more information, see Create a snapshot for a disk.

  2. Go to the disk buy page. Select the region and zone of the ECS instance to purchase a pay-as-you-go disk. Click Create from Snapshot. In the Select Snapshot dialog box, select the snapshot created in the previous step.

  3. Log on to the ECS console and attach the new data disk that you purchased in the previous step to the ECS instance.

  4. Log on to the ECS instance and run the mount command to attach the new data disk to the instance. For more information about how to attach a disk created from a snapshot, see Create a disk from a snapshot.

  5. Check whether files in the new data disk are the same as those in the original data disk.

  6. Run the fdisk command to delete the original partition table. Then, run commands such as fdisk and mkfs.ext3 to re-partition and re-format the new data disk and resize it to the desired capacity. For more information, see Offline extend partitions and file systems on a data disk of a Linux instance.

  7. Run the cp -R command to copy all data in the new data disk back to the original data disk.

    You can add the --preserve=all parameter to retain the file attributes when you copy the files.

  8. Run the umount command to detach the new data disk.

  9. Detach the new data disk from the ECS instance and release the disk in the ECS console.

What do I do if the error message "Bad magic number in super-block while trying to open /dev/vdb1" appears when I resize a disk of a Linux instance?

  • Problem description: When you run the e2fsck -f /dev/vdb command to resize a disk of a Linux instance, the error message "Bad magic number in super-block while trying to open /dev/vdb1" appears.

  • Cause: The start sector of the disk partition is invalid. For example, after you can run the fdisk -lu command, the command output indicates that the start sector number before the disk is resized is 63. However, when you re-create a partition for the disk, the default start sector number is 2048.

  • Solution:

    1. Run the fdisk -lu /dev/vdb command to view and record the number of the start sector before you re-create a partition for the disk.

    2. After you re-create a partition for the disk, run the fdisk /dev/vdb command to modify the start sector of the partition, run the r command to return to the main menu, and then run the wq command to save the modification and exit.

    3. Run the e2fsck -f /dev/vdb and resize2fs /dev/vdb commands to resize the disk again.

    4. Run the mount command to re-mount the disk.

What do I do if I have resized a disk offline but do not want to restart the instance?

If you have resized a disk offline but do not want to restart the instance, you can resize the disk online again to make the offline resizing operation take effect when the instance is in the Running state. You are charged for resizing the disk online. Resize the disk based on your business requirements.

For example, assume that you have resized a disk of an instance to 60 GiB in the ECS console, but you do not want to restart the instance, the disk resizing does not take effect. You can resize the disk online again in the ECS console. For example, you can resize the disk to 61 GiB. After the disk is resized, you can see that the capacity of the disk is resized to 61 GiB in the operating system.

Can I partition a data disk for data storage?

Yes, data disks can be partitioned for data storage. You can split a data disk into multiple partitions. We recommend that you use the system tool for partitioning.

For a disk with multiple partitions, are snapshots created for the entire disk or only for a specific partition?

Snapshots are created for the entire disk, instead of for a specific partition.

What must I be aware of before I re-partition a disk?

To ensure data security, we recommend that you create a snapshot of a disk before you re-partition the disk. This way, you can roll back the disk if you perform an invalid operation. For more information, see Create a snapshot for a disk and Roll back a disk by using a snapshot.

What is the relationship between data writing and partitioning and formatting?

A new disk or disk partition can be used only after it is initialized and has its data structure recorded on the disk. The goal of formatting is to create file systems. Therefore, when a file system is created on a disk, data of the file system is written to the disk. The amount of data written to disks during formatting varies based on the file system.

  • In a Windows instance, you can use one of the following methods to format a data disk:

    • Quick formatting: This method allows you to allocate only file systems to partitions and rewrite the directory table. Quick formatting takes up less space than full formatting.

    • Full formatting: This method allows you to allocate files systems to partitions, rewrite the directory table, and scan for and mark damaged sectors. Additionally, during the formatting process, empty data blocks on the disk are filled in, which has the same effect as writing data to the entire disk. In this case, the size of the first full snapshot is approximately equal to the disk size.

  • In a Linux instance, if no data is written to a disk after you format the disk, the size of the first snapshot depends on the format of file systems on the disk.

I rolled back a data disk by using a snapshot after I re-partitioned the disk. How many partitions are available in the disk?

When you roll back a data disk by using a snapshot, the disk enters the state it was in when the snapshot was taken. If the disk has not been re-partitioned when the snapshot was taken, only one partition is available in the disk.

When I roll back a disk, an error message similar to the following one is returned: "A disk can be rolled back only when the instance to which the disk is attached has been stopped and the disk has no snapshots being created. If the operating system of the instance has been replaced, the snapshot taken before the operating system was replaced cannot be used to roll back the new system disk". What do I do?

  • Problem description: When you want to roll back a disk by using a snapshot, an error message similar to the following one is returned: "A disk can be rolled back only when the instance to which the disk is attached has been stopped and the disk has no snapshots being created. If the operating system of the current instance has been replaced, the snapshot taken before the operating system is replaced cannot be used to roll back the new system disk."

  • Cause: The issue may be caused by an invalid disk attribute or disk state.

  • Solution: You can troubleshoot this issue based on the instance state or snapshot state.

    • Check whether the instance to which the disk is attached is stopped.

      You can roll back disks only when the instance to which the disks are attached is in the Stopped state. You can log on to the ECS console and check the state of the instance on the Instances page.

    • Check whether the system disk of the instance associated with the snapshot is replaced.

      If you selected an image to replace the system disk, a new system disk is automatically created from the new image, and the system disk ID changes. Therefore, you cannot use the snapshots taken for the original system disk to roll back the new system disk. However, you can create a custom image from one of these snapshots and then use the custom image to replace the system disk of the instance. This way, the instance returns to the state it was in when the snapshot was taken. For more information, see Create a custom image from a snapshot and Replace the operating system of an instance by using a non-public image.

    • Check whether the disk to be rolled back has a snapshot being created.

      To ensure data consistency, Alibaba Cloud does not allow users to roll back a disk when a snapshot is being created from the disk. On the Instance Details page, click the Snapshot tab and check the states of snapshots. A snapshot is being created if the Progress value is not 100% and the Status value is Progressing.

      If you want to forcefully terminate the creation process of a snapshot to roll back the disk, select the snapshot and click Delete.

How do I migrate data from the system disk of a Linux instance?

Assume that you purchase a Linux instance and do not attach data disks to it. After the instance is used for a period of time, its system disk usage approaches 100% and can no longer meet your business needs. To resolve this issue, you can purchase a data disk and attach it to the instance. Then, run the mv command to migrate data from the system disk to the data disk.

How do I copy data across instances?

You can use one of the following methods to copy data across instances based on the operating system:

  • Copy data between Linux instances.

    • Use the lrzsz tool.

      Log on to the Linux instances, install the lrzsz tool, run the rz command to upload files to one Linux instance, and then run the sz command to download the files to the other Linux instance.

      You can also run the sz command to download files to your computer and then run the rz command to upload these files to the other Linux instance.

    • Use the FTP service.

      If you use the SFTP tool, we recommend that you use the root account to log on to instances and to upload or download files.

    • Run the wget command.

      On one instance, compress a file or a folder and then save it to the web directory to generate a download URL. Then, run the wget command on the other Linux instance to download the file or folder.

    • Use the secure copy (SCP) utility.

      Log on to the instance. Use the SSH username and password of the source instance and run SCP commands to copy data. You can learn more about SCP commands in Linux as needed.

  • Copy data between a Linux instance and a Windows instance.

    We recommend that you use the SFTP tool to download files from the Linux instance to your computer and then use the FTP service to upload the files to the Windows instance.

  • Copy data between Windows instances.

    • Use the FTP service.

    • Use TradeManager.