In the end I guess that is really the question I want to find an answer for: Can I crash a Linux box if the root filesystem does not have a unique UUID? But please read on, this question is about understanding the cause in depth and not so much the effect of a faulty configuration.
Given the fact that I can clone an entire root filesystem including its UUID in a separate partition of identical size. On both the original and the clone the inodes would point you to a copy of the same file and the same block on disk (partitionwise), so you wouldn't notice anything starting to go wrong.
But if so, I want to understand why, or what the nature of problems would be that can be expected. There are a lot of writings on the topic how UUID's in filesystems can ease your life, how they are supposed to work, how
udev builds nice device trees in
/dev. And there is the remark UUID's must be unique in a Linux box. I guess UUID's are well documented from a userspace perspective, but I want to understand the kernelspace perspective better.
Could you for example get some sort of split brain situation where some blocks are read or written from the one partition and other blocks from the other partition? Can the kernel lock up? Perhaps trouble mounting and/or unmounting the other device? Perhaps on a side track: How does multipathing fit in, which is able to manage a very specific case of duplicate UUID's.
Back to the actual question: How does the kernel actually utilize these UUID's internally? When I mount a filesystem by UUID and I inspect the output of
/proc/mounts, none of these show the UUID that I used to issue the mount command with, they always show me the device node in
/dev. Is there a userspace interface for the UUID to device mapping (which is not necessarily the same as device to UUID)? How does the kernel decide which block device to access and can this more or less spontaneously change over time, maybe due to certain events? What can happen to my machine / filesystems if I do not obey the simple rule of unique UUID's?
Perhaps my answer is in https://www.kernel.org/doc/ but that is a bit overwhelming when I don't known what exactly I am searching for. Deep links into this website are welcome too.