Bare Metal Data Disk_Linux
If the host has not previously partitioned and only uses bare disk formatting, the following method can be used for expansion.
Note:
Please confirm before disk expansion operation, if there is data in the data disk, it is recommended that you backup the data first. The cloud disk can only be expanded when it is in an available state. Since the cloud disk needs to be uninstalled, it will interrupt your business, so please operate carefully. </ WRAP>
Operation Information:
- The version of this example environment:
In this example, the mounting point of the cloud disk is /dev/vdb, please operate according to the actual situation. If you do not see the corresponding device, please check the mounting information and status of the cloud disk.
Specific operations:
- Check the current mounting situation, file system type, and partition situation.
Note: The lsblk command result shows that there is no partition under vdb, it is a naked device, and it can be expanded according to the plan described in this document; if there is a partition under vdb, please refer to the corresponding partition expansion documentation.
- Unmount the cloud disk in the operating system and console, for specific steps, see the Unmount Cloud Disk section. Expand the cloud disk through the disk console.
- Mount the cloud disk in the console. For specific steps, see the Mounting a Cloud Disk section. After the mount is completed, check the disk size in the operating system.
- Check the file system and expand it. Note: Under different file systems, the check and expansion commands are different. Please confirm your file system type and operate according to the corresponding operation steps.
ext4 file system
- Execute e2fsck -f /dev/vdb to check the file system.
- Execute resize2fs /dev/vdb to perform the expansion operation.
- Use the mount command to re-mount the disk.
xfs file system
- Execute xfs_check /dev/vdb to check the file system.
- Or execute xfs_repair /dev/vdb command to check the file system.
- Use the mount command to re-mount the disk.
- Execute the xfs_growfs command to expand.