Linux UUID Resolution Guide

This guide covers the identification and resolution of duplicate Universally Unique Identifiers (UUIDs) across various Linux file systems and Volume Managers.

1. Identification

Before making changes, identify which partitions are sharing the same UUID.

Look for matching strings in the UUID column for different device names (e.g., /dev/sda1 and /dev/sdb1 having the same ID).

2. File System Specific Fixes

EXT4 File Systems

For EXT2, EXT3, or EXT4 partitions, you can generate a new random UUID while the drive is live or unmounted.

# Syntax: sudo tune2fs -U random /dev/sdX#
sudo tune2fs -U random /dev/sdb1

XFS File Systems

Warning: The partition must be unmounted before changing the UUID on XFS.
# 1. Unmount the partition
sudo umount /dev/sdX#

# 2. Generate a new UUID
sudo xfs_admin -U generate /dev/sdX#

3. Logical Volume Management (LVM)

LVM uses UUIDs for Physical Volumes (PV) and names for Volume Groups (VG). Cloning an LVM disk creates duplicates of both.

Step A: Identify LVM Duplicates

Use these commands to check for "Duplicate PV" warnings:

Step B: Assign New PV UUID

sudo pvchange -u /dev/sdX2

Step C: Rename Duplicate Volume Groups

# sudo vgrename [VG_UUID] [new_vg_name]
sudo vgrename a1b2c3-d4e5-f6g7-h8i9 new_vg_name

4. Post-Change Configuration (Critical)

Changing a UUID will break your automatic mounting if the system is looking for the old ID.

Update /etc/fstab

Update Bootloader

If you changed the UUID of your root (/) or boot partition, you must update your GRUB configuration:

sudo update-grub

5. Verification

Finalize the process by testing the mounts and rebooting.