文件系统UUID是什么?

huangapple go评论99阅读模式
英文:

What is the filesystem UUID?

问题

文件系统UUID是什么?
我想知道文件系统UUID是如何使用的。

例如,在XFS中如果UUID重复,挂载将失败。

$ dmesg | tail
[345633.687773] XFS (sdc): Filesystem has duplicate UUID 4e6fb31f-a2c4-45a1-8502-63fdc0fd42e0 - can't mount
...

在其他文件系统(例如ext4、btrfs等)中是否应避免UUID重复?

英文:

What is the filesystem UUID?
I want to know how filesystem UUID is used.

For example, if duplicate UUID in xfs, mounting is failed.

$ dmesg | tail
[345633.687773] XFS (sdc): Filesystem has duplicate UUID 4e6fb31f-a2c4-45a1-8502-63fdc0fd42e0 - can't mount
...

Should UUID duplication be avoided on other filesystems(e.g. ext4, btrfs, etc...)?

答案1

得分: 1

以下是翻译好的部分:

"Here is a useful article explaining what UUID is and the problems it solves. In a nutshell, it's a universally unique identifier which allows administrators to distinguish between multiple filesystems in a Linux machine."

这里是一篇有用的文章,解释了UUID是什么以及它解决了什么问题。简而言之,它是一个“通用唯一标识符”,允许管理员区分Linux机器中的多个文件系统。

"> Should UUID duplication be avoided on other filesystems(e.g. ext4, btrfs, etc...)?"

是的,无论文件系统类型如何,都应避免UUID的重复。

"For XFS, the following command can be used to regenerate the UUID of an XFS filesystem:

xfs_admin -U generate /dev/sdc

Running this command should show you the new UUID. Edit /etc/fstab, then you should be good to go."

对于XFS,可以使用以下命令重新生成XFS文件系统的UUID:

xfs_admin -U generate /dev/sdc

运行此命令应该会显示新的UUID。然后编辑/etc/fstab,然后您就可以继续了。

英文:

Here is a useful article explaining what UUID is and the problems it solves. In a nutshell, it's a universally unique identifier which allows administrators to distinguish between multiple filesystems in a Linux machine.

> Should UUID duplication be avoided on other filesystems(e.g. ext4,
> btrfs, etc...)?

Yes, UUID's should be unique, no matter what the filesystem type is.

For XFS, the following command can be used to regenerate the UUID of an XFS filesystem:

xfs_admin -U generate /dev/sdc

Running this command should show you the new UUID. Edit /etc/fstab, then you should be good to go.

huangapple
  • 本文由 发表于 2020年1月6日 15:01:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/59607930.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定