If a Linux Elastic Compute Service (ECS) instance cannot start and has been diagnosed to have a disk with high inode or space usage, you can use the instance health diagnostics feature to perform troubleshooting.
Prerequisites
Instance Health Diagnostics has identified that a disk on the ECS instance has high inode or space usage.
The ECS instance and its resources meet the following conditions.
Resource
Conditions
Instance
The instance is an I/O optimized instance.
The following instance types are not supported: ecs.ebmc4.8xlarge, ecs.ebmhfg5.2xlarge, and ecs.ebmg5.24xlarge.
Disk
The disk is in the In Use state.
The disk is an enterprise SSD (ESSD), a standard SSD, or an ultra disk.
After you renew a subscription instance and downgrade its configurations, you cannot resizing the subscription disks of the instance for the remainder of the current billing cycle.
The new capacity of the disk cannot exceed the maximum capacity allowed for its category. For more information, see Limits of Elastic Block Storage.
ImportantA disk that uses the Master Boot Record (MBR) partition format cannot be resized to 2 TiB or larger. To resizing an MBR disk to a capacity greater than 2 TiB, create a disk larger than 2 TiB, format it to use the GUID Partition Table (GPT), and then copy the data from the MBR disk to the new GPT disk. For more information about how to format a GPT partition, see Partition and format a data disk larger than 2 TiB.
Background
Problem description: A Linux instance cannot start because the inode or space usage of a disk on the instance is high.
Cause: The disk has insufficient capacity and must be resized.
Run the df -Th command to check the space usage of the disk. Run the df -i command to check the inode usage of the disk.
You can use a repair disk provided by the instance health diagnostics feature or use an intermediate instance to resize the disk. For more information, see Use a repair disk to resize the disk or Use an intermediate instance to resize the disk.
Use a repair disk to resize the disk
You can use a repair disk provided by the instance health diagnostics feature to resize the abnormal disk of the instance.
Create a snapshot of the target disk in the console. For more information, see Create a snapshot.
Resizing the target disk in the console. For more information, see Expand the capacity of a disk.
Connect to the faulty Linux ECS instance.
When a repair disk is attached to the ECS instance, you can use only Virtual Network Computing (VNC) to connect to the instance. For more information, see Connect to an instance by using VNC.
Run the following command to view the disks attached to the instance:
fdisk -luIn the command output, find the device names of disks in the /dev/vd* format, such as /dev/vda, /dev/vdb, and /dev/vdc.
The following figure shows an example of three partitions: the system disk partition (/dev/vda1) and two data disk partitions (/dev/vdb1 and /dev/vdc1).

No.
Partition
Description
①
/dev/vda1The system disk, where System is a Linux partition, is an MBR partition.
②
/dev/vdb1The data disk, where System is a Linux partition, is an MBR partition.
③
/dev/vdc1The data disk, where System is a GPT partition, is a GPT partition.
NoteIf the disk capacity shown in the command output has not increased, the resizing failed. For example, if a 40 GiB disk still shows a capacity of
Disk /dev/vda: 42.9 GB, restart the instance in the ECS console.Run the following command to check the file system type of the existing partition.
df -Th
Run the following command to resize a partition:
growpart /dev/vda 1This example shows how to resize the system disk partition. A space is required between
/dev/vdaand1. To resize other partitions, modify the command as needed. The following figure shows the command output.
On the ECS instance, resizing the file system based on the file system type.
To resize an ext* file system, such as ext4, run the following command:
Resizing the file system of the system disk partition /dev/vda1.
resize2fs /dev/vda1Resizing the file system of the data disk partition /dev/vdb1.
resize2fs /dev/vdb1Note/dev/vda1and/dev/vdb1are partition names. Modify them as needed.To resize an xfs file system, run the following command to resize the file system of the data disk partition /dev/vdc1.
xfs_growfs /media/vdcNote/media/vdcis the mount point of/dev/vdc1. Modify it as needed.To resize a btrfs file system, run the following command:
btrfs filesystem resize max /mountpointNote/mountpointis the mount point of the data disk. Modify it as needed.
Run the following command to check the resizing result.
df -ThThe following figure shows the command output.

After the resizing is complete, verify that your data is intact.
If the resizing is successful and the applications on the ECS instance run as expected, the process is complete.
If the resizing fails, use the snapshot that you created to restore the disk.
After the disk is resized, exit the repair environment and check the state of the instance.
Go to the Instance Health Diagnosis tab of the Troubleshooting page in the ECS console to detach the repair disk and start the instance.
Connect to the instance and view the capacity of the resized disk.
Use an intermediate instance to resize the disk
Alternatively, you can detach the abnormal disk from the Linux instance, select another Linux instance within the same region as an intermediate instance, and then attach the disk to the intermediate instance.
Detach the abnormal disk from the Linux instance. For more information, see Detach the system disk or Detach a data disk.
Attach the disk to an intermediate Linux instance. For more information, see Attach a data disk.
Resizing the disk on the intermediate instance. For more information, see Expand the capacity of a disk.
After the disk is resized, detach it from the intermediate Linux instance. For more information, see Detach a data disk.
Attach the disk back to the original Linux instance. For more information, see Detach or attach a system disk or Attach a data disk.
Connect to the instance and view the capacity of the resized disk.