On Fri, 6 Aug 2021 19:25:45 +0200
"Dr. Nikolaus Klepp" <office(a)klepp.biz> wrote:
Anno domini 2021 Fri, 6 Aug 17:17:28 +0200
phiebie(a)drei.at scripsit:
Nik mentioned a case, where this wouldn't
work as expected. But
Linux prefers to use UUID (Universally Unique Identifier), LABEL, or
symlinks to identify media storage devices on a system. Using device
assignments (like /dev/hd*# or /dev/sd*#) is not preferred since these
can change between system boots.
Source ubuntu documentation.
They don't change and never have. Systemd GNOMEs have put that myth out to justify
the crude new naming scheme for e.g. ethX - which, too, never change but behave
deterministic. I would not blame changing names on the OS when the user moves hardware
e.g. from sata0 to sata2 and keeps sata1 in place.
Externals can change their device nodes randomly (I have a flaky Pi
+ enclosure combination where the drive can show up as sda or sdb
depending on what it ate for breakfast). I suppose there are some people
for whom that matters, and I do use a label in the autofs configuration
on that flaky Pi (the only place I've ever used one).
I've never seen an internal drive change its device node without a hardware
change, but I suppose it would in theory be possible for it to happen if the
system for some reason initialized an external drive attachment point first,
or a drive ahead of it in the initialization order failed so hard that the system
could no longer detect it. Regardless, I would class it as highly unusual
on a system that doesn't have hot-swap drive bays or the like. Gentoo
documentation doesn't indicate a preference for one type of drive identifier
over the others. We could perform a survey, I suppose.
E. Liddell