Re: nouuid hint in kernel message?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 06, 2025 at 12:46:23AM +0100, Kjetil Torgrim Homme wrote:
> hey people, thank you for XFS!
> 
> tl;dr: consider changing the kernel message "Filesystem has duplicate
> UUID - can't mount" to include a hint about the existence of the nouuid
> mount option.  perhaps append " (use -o nouuid?)" to message?

This looks good at first, but adding a message like this has a big down
side IMHO. This leads users to simply attempt to do that even in cases when they
shouldn't.

As an example, in a common multipath environment with dm-multipath, an user
might accidentally attempt to mount both individual paths to the same device,
and this uuid duplicate check protects against such cases, which might end in
disaster.

On a mid term here, I think we could improve xfs(5) to include a bit more
information about duplicated uuids.

Carlos

> 
> sad backstory:
> 
> today I tried to use LVM snapshots to make consistent backups of XFS,
> but I was stumped by:
> 
>    mount: /mnt/snap: wrong fs type, bad option, bad superblock on /dev/mapper/vg0-test--snap, missing codepage or helper program, or other error.
>           dmesg(1) may have more information after failed mount system call.
> 
> and dmesg said:
> 
>    XFS (dm-7): Filesystem has duplicate UUID d806fb70-8d81-4e57-a7e3-c2ed0a14af59 - can't mount
> 
> so - I thought the solution was to change the UUID of my snapshot using
> `xfs_admin -U generate`.  this is the response (when the snapshot is of
> an active filesystem):
> 
>    ERROR: The filesystem has valuable metadata changes in a log which needs to
>    be replayed.  Mount the filesystem to replay the log, and unmount it before
>    re-running xfs_admin.  If you are unable to mount the filesystem, then use
>    the xfs_repair -L option to destroy the log and attempt a repair.
>    Note that destroying the log may cause corruption -- please attempt a mount
>    of the filesystem before doing this.
> 
> so since I was unable to mount the filesystem, I tried xfs_repair -L --
> which took a very long time and in the end gave me a corrupt filesystem.
> 
> ... and then I found out about -o nouuid, so there was a happy ending :)
> but I think it's a reasonably simple fix to give a hint to the user in
> the kernel error message.
> 
> thank you!
> --
> venleg helsing,
> Kjetil T.
> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux