Changing the UUID of an EVS Disk
A UUID conflict may occur when you create a new EVS disk from a snapshot and then attach the disk to the original Linux server. This is because the new disk and the original disk share the same UUID. A UUID conflict may cause the following issues:
- If the new data disk is created from a system disk snapshot and attached to the original Linux server, the server will boot from the newly attached data disk.
- If you want to mount an xfs file system, the xfs file system cannot be mounted.
To solve the preceding issues, you can perform the following steps to change the UUID of the new disk:
- Remotely log in to the ECS.
For how to log in to an ECS, see Logging In to an ECS.
- Check the file system format and the disk UUID.
blkid
/dev/vda1: UUID="77c49bb7-1279-434b-b971-c486dd68cce7" TYPE="ext4" PARTUUID="23c4b6da-01" /dev/vdb1: UUID="77c49bb7-1279-434b-b971-c486dd68cce7" TYPE="ext4" PARTUUID="23c4b6da-01" /dev/vdc1: UUID="a1b2c3d4-e5f6-7890-a458-ca1234567890" TYPE="xfs" LABEL="xfs_data" /dev/vdd1: UUID="a1b2c3d4-e5f6-7890-a458-ca1234567890" TYPE="xfs" LABEL="xfs_data"
- Check the file system.
e2fsck -f /dev/vdb1
- Change the UUID of the ext2, ext3, or ext4 file system.
- Generate a new UUID for the disk.
- Check whether the UUID has been changed.
If information similar to the following is returned, the UUID of the new EVS disk has been changed.
/dev/vda1: UUID="77c49bb7-1279-434b-8971-c486dd60cce2" TYPE="ext4" PARTUUID="23c4b6da-01" /dev/vdb1: UUID="fa79812d-4f12-4722-9fa9-9ee492d6ee8e" TYPE="ext4" PARTUUID="23c4b6da-01"
- Mount the EVS disk to the ECS.
- Configure the /etc/fstab file by referring to Creating and Mounting a File System to configure auto mount at startup for the new disk.
- Change the UUID of the xfs file system.
- Generate a new UUID for the disk.
- Check whether the UUID has been changed.
If information similar to the following is returned, the UUID of /dev/vdb1 has been changed.
/dev/vdc1: UUID="a1b2c3d4-e5f6-7890-a458-ca1234567890" TYPE="xfs" LABEL="xfs_data" /dev/vdd1: UUID="12345678-90ab-cdef-1234-567890abcdef" TYPE="xfs" LABEL="xfs_data"
- Mount the EVS disk to the ECS.
- Configure the /etc/fstab file by referring to Creating and Mounting a File System to configure auto mount at startup for the new disk.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot