• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Search

uuid

Mounting Duplicate UUIDs

January 12, 2021

While trying to recover a directory from backup, I ran into an issue with duplicate uuids when trying to mount a recovered volume. The problem was the recovered volume had the same uuid as boot.

Here’s the original mount command I ran, but I was getting a wrong fs type error.

mkdir
mount -t xfs /dev/nvme3n1p2 /recover
mount: wrong fs type, bad option, bad superblock on /dev/nvme3n1p2,
       missing codepage or helper program, or other error

mkdir mount -t xfs /dev/nvme3n1p2 /recover mount: wrong fs type, bad option, bad superblock on /dev/nvme3n1p2, missing codepage or helper program, or other error

It turned out to be a duplicated uuid. To get around this problem, I ran -o nouuid.

mount -t xfs -o nouuid /dev/nvme3n1p2 /recover

mount -t xfs -o nouuid /dev/nvme3n1p2 /recover

Once the files were recovered, I unmounted volume and detached it from the instance.

Filed Under: Linux Tagged With: duplicate, mount, uuid

XFS Filesystem has duplicate UUID

October 7, 2019

Here’s how to fix a duplicate UUID on a XFS file system.

mount -o rw,nouuid /dev/sda1  /data

mount -o rw,nouuid /dev/sda1 /data

Mounting with nouuid will work, but not after a reboot.

To avoid a duplicate ID, run this command to generate a new UUID.

xfs_admin -U generate /dev/sda3
Clearing log and setting UUID
writing all SBs
new UUID = xxxxx-xxxx-xxxx-xxxxxxxxx

xfs_admin -U generate /dev/sda3 Clearing log and setting UUID writing all SBs new UUID = xxxxx-xxxx-xxxx-xxxxxxxxx

Filed Under: Linux Tagged With: duplicate, generate, mount, uuid, xfs

Print Block Device Attributes

March 5, 2019

Everything you need to know about block devices, e.g. UUID

blkid
# or
blkid /dev/xvda

blkid # or blkid /dev/xvda

You can also run file -s. You need to be root.

file -s /dev/xvda1

file -s /dev/xvda1

Filed Under: Linux Tagged With: block, devices, uuid, volumes

  • Home
  • About
  • Search

Copyright © 2023