XFS duplicate UUIDPosted: 2019-07-15 Filed under: system | Tags: clone, disk, mount, uiid, XFS, xfs_admin Leave a comment
During my disk cloning exercises, I stumbled upon an issue when cloning a partition formatted as XFS. Cloning with dd went fine, however, when trying to mount the newly created partition in Thunar, I would get an error (sorry no screenshot). Then, I tried to mount in manually and investigate what the problem was.
mount /dev/sdh1 /media/memory0
This failed to mount the partition with the following error message:
mount: wrong fs type, bad option, bad superblock on /dev/sdh1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog – try
dmesg | tail or so.
Well, I did what the message advised, so I ran:
dmesg | tail
This resulted in the following message:
Filesystem has duplicate UUID
I searched a bit and found this discussion at Linux Tips. Following the instructions, I first mounted the filesystem with the
nouuid option, then unmounted it and finally generated a new UIID:
mount -o nouuid /dev/sdh1 /media/memory0 umount /dev/sdh1 xfs_admin -U generate /dev/sdh1
This gave as an output:
Clearing log and setting UUID
writing all SBs
Now the partition can be mouned normally. Great!