Updating fstab Entries to Use UUIDs

Article ID: 78266

Article Type: Technical Reference

Last Modified:

Update fstab entries to use UUIDs, as follows:

  1. Log in as root user.
  2. Run the following command to query all types of mounted file systems and device UUIDs:
blkid

Sample output:

/dev/sda2: UUID="4eb40294-4c6f-4384-bbb6-b8795bbb1130" TYPE="xfs"

/dev/sda1: UUID="2de37c6b-2648-43b4-a4f5-40162154e135" TYPE="swap"

  1. Run the following command to open fstab file:
# cat /etc/fstab

Sample output: /dev/sda2  /       xfs     defaults    0 0

  1. Check the disk identifier in the fstab file, and then review the following:

UUID=a1228fd4-9288-4db2-8fd0-69dab79ccfda   /          xfs     defaults        0 0

/dev/sda2    /       xfs     defaults    0 0

  1. Run the following command to open the fstab file in the vi editor (note that you can use another text editor, if you want) :
vi /etc/fstab

  1. Press i to enter editing mode, and then change the disk identifier to UUID., as follows:

UUID=a1228fd4-9288-4db2-8fd0-69dab79ccfda    /        xfs     defaults        0 0

  1. Press ESC, enter :wq, and then press ENTER. The system saves the configuration and then exits the vi editor.

Note: If your system uses device names from the grub configuration, see "Upgrading a grub/grub2 Configuration for EFI Hosts to Use UUID Disk Identifiers". (https://kb.commvault.com/article/77906)

1 Commvault Way, Tinton Falls, NJ 07724 Sitemap | Legal Notices | Trademarks | Privacy Policy
Copyright © 2022 Commvault | All Rights Reserved.