If you create a disk from a snapshot of a disk on a Linux instance and attach the created disk to the Linux instance, the universally unique identifier (UUID) of the disk conflicts with that of the disk from which the snapshot is created. This topic describes how to modify the UUID of a disk.
Background information
After a disk is created from a snapshot of a disk on a Linux instance, the UUID of
the created disk is the same as that of the disk from which the snapshot is created.
If you attach the created disk to the Linux instance, the UUID of the disk conflicts
with that of the disk from which the snapshot is created. The following issues may
occur:
- If you create a disk from a system disk snapshot of a Linux instance and attach the created disk to the Linux instance, Linux may be started from the newly attached data disk rather than the system disk.
- If your disk uses the XFS file system, the mount operation is prohibited due to a
UUID conflict. The
"mount: wrong fs type, bad option, bad superblock on /dev/vdd1,"
message appears.
Therefore, after you create a disk from a snapshot of a disk on a Linux instance and
attach the created disk to the Linux instance in the console, you must log on to the
instance to modify the UUID of the created disk before you perform the mount operation.
To modify the UUID of your disk, you can run the
blkid
command to query its file system type and choose one of the following methods based
on the command output:
- If the command output is
TYPE="ext4"
,TYPE="ext3"
, orTYPE="ext2"
, see Modify the UUID of an ext2, ext3, or ext4 file system. - If the command output is
TYPE="xfs"
, see Modify the UUID of an XFS file system.
Modify the UUID of an ext2, ext3, or ext4 file system
Note In this example, /dev/vdb1 is used. You must modify the related commands based on
your device name.
Modify the UUID of an XFS file system
Note In this example, /dev/vdd1 is used. You must modify the related commands based on
your device name.