问题原文
原帖链接 · 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.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
