How Do I Change the Disk Identifier in the fstab file to UUID?
Scenarios
After attaching disks to a Linux BMS, you must change the disk identifier in the fstab file to UUID. Otherwise, you cannot enter the BMS OS or the BMS becomes unavailable due to a mount point disorder after you stop and start the BMS, or restart the BMS.

Universally Unique Identifier (UUID) is a 128-bit number used to identify information in computer systems.
Procedure
This section takes CentOS 7 as an example to describe how to change the disk identifier in the fstab file to UUID.
- Log in to the BMS as user root. Run the blkid command to query all types of file systems that have been mounted to the BMS and UUIDs of the corresponding devices.
/dev/sda2: UUID="4eb40294-4c6f-4384-bbb6-b8795bbb1130" TYPE="xfs" /dev/sda1: UUID="2de37c6b-2648-43b4-a4f5-40162154e135" TYPE="swap"
- Run the cat /etc/fstab command to open the fstab file.
/dev/sda2 / xfs defaults 0 0 /dev/sda1 swap swap defaults 0 0
- Check the disk identifier in the fstab file.
- If the disk identifier is UUID, no further action is required.
- If the disk identifier is the device name, go to 4.
- Run the vi /etc/fstab command to open the fstab file, press i to enter editing mode, and change the disk identifier to UUID.
UUID=4eb40294-4c6f-4384-bbb6-b8795bbb1130 / xfs defaults 0 0 UUID=2de37c6b-2648-43b4-a4f5-40162154e135 swap swap defaults 0 0
Press Esc and enter :wq to save and exit the file.
Disk FAQ FAQs
- Can EVS Disks Be Attached to BMSs? How Many Data Disks Can Be Attached to a BMS?
- What Are the Restrictions for Attaching a Disk to a BMS?
- How Do I Know Whether EVS Disks Are Available in a Flavor?
- How Do I Change the Disk Identifier in the fstab file to UUID?
- How Do I Obtain the Drive Letter of an EVS Disk?
- Are the EVS Disk Device Names on the Console and the Device Names in BMS OSs Consistent?
- Why Is the EVS Disk Size Not Updated in the BMS OS After the EVS Disk Capacity Has Been Expanded?
- How Can I Restore System Disk Data Using the Snapshot?
- What Do I Do to Prevent Risks of Attaching or Detaching the System Disk?
- How Should I Select Storage?
- Why Is the Disk Capacity Displayed in the BMS OS Less Than That Displayed on the Official Website?
Feedback
Was this page helpful?
Provide feedbackFor any further questions, feel free to contact us through the chatbot.
Chatbotmore