2

I am running CoreOS with the root filesystem on a particular SSD device (say /dev/sda) and I want to install Flatcar Linux onto a different SSD device (say /dev/sdb). The reason I am doing this is that /dev/sdb is smaller so I want to turn /dev/sda into a device just for external storage.

CoreOS labels the root filesystem partition ROOT, (i.e. /dev/disk/by-partlabel/ROOT is a symlink to the root partition on /dev/sda). However, when I install Flatcar Linux onto /dev/sdb, I will get the same thing (i.e. the root partition on /dev/sdb will also be labelled ROOT -- I could change this of course, but my OCD wants to stick to the same value specified in the documentation).

I plan to change the BIOS settings to prioritise /dev/sdb over /dev/sda when booting so that Flatcar Linux boots by default, but will there be an issue with these clashing partlabels? I would hope that udev (which creates these symlinks as far as I know) would see that the /dev/disk/by-partlabel/ROOT symlink already exists (and refers to the root partition on /dev/sdb) and skips creating the symlink for /dev/sda, but is that actually what happens?

1 Answer 1

1

I would hope that udev (which creates these symlinks as far as I know) would see that the /dev/disk/by-partlabel/ROOT symlink already exists (and refers to the root partition on /dev/sdb) and skips creating the symlink for /dev/sda, but is that actually what happens?

Unfortunately with udev the last device processed using the udev rule wins so usually udev will first create the symlink for sda on overwrite it when processing sdb (but it's not guaranteed udev will process disks in alphabetical order so the symlink can point to a different device after every boot).

but will there be an issue with these clashing partlabels

No if you don't use them in some system configuration. /etc/fstab by default uses UUID so there shouldn't be a problem with it.

File managers (or UDisks actually) usually use labels (but primarily filesystem labels) as a "nice" name for drives but not for your "active" root filesystem so it also shouldn't be a problem. In general labels are not guaranteed to be unique (and you see duplicates all the time, for example all Kingston USB flash drives label the filesystem "Kingston") so all tools should expect duplicates and use UUID if they want something unique.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.