大网数据广告活动
服务器运维问答

in which cases it will be problematic to configure UUID in fstab

· 52CE 我爱测

We are thinking about to change all Linux fstab configuration to work with UUID instead the current configuration Some of the disks are with non RAID and some of the disks are with RAID10 I searched in google and find complain ab…

问题原文

原帖链接 · shalom · CC BY-SA 3.0

We are thinking about to change all Linux fstab configuration to work with UUID instead the current configuration

Some of the disks are with non RAID and some of the disks are with RAID10

I searched in google and find complain about using UUID for RAID1 :

" Unfortunately you MUST NOT use UUID in /etc/fstab if you use software RAID1. Why? Because the RAID volume itself and the first element of the mirror will appear to have the same filesystem UUID. If the mirror breaks or for any other reason the md device isn't started at boot, the system will mount any random underlying disk instead, clobbering your mirror. Then you'll need a full resync. Bad juju."

So I just want to know if we can use UUID for RAID10 ?

and in which cases ( RAID configuration ) not to use UUID?

second - in few lines what are the benefit to use UUID ?

已采纳解答

原帖链接 · HBruijn · CC BY-SA 3.0

Yes, you can use UUID's with Linux software raid.

But rather than using the UUID of the filesystem (which can show up as non-unique in case of software raid mirroring) you should use the UUID of the RAID device in your /etc/fstab as that will be unique for sure.

mdadm --detail /dev/md0

will display the UUID of the /dev/md0 block device.

I think blkid should show the same.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-12-06)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。