XFS duplicate UUID

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.

I did:

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!



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s