3

I got 3 HDDs in a server hdd0 (sda), hdd1(sdb) and hdd2(sdc).

Then I swap hdd1 and hdd2, so now hdd2 is in the second slot and hdd1 is in the third slot (this is also confirmed by the RAID BIOS)

But when I boot to linux what is now hdd1 kept it's previous name of sdc and hdd2 is still sdb

So now it's something like this hdd0 (sda), hdd1(sdc) and hdd2(sdb)

Can someone explain why this is?

Thank you

  • 2
    Do you have udev rules in place? – eblock Sep 18 at 10:30
2

More rules can take the place. The first harddisk detection is made by BIOS (UEFI). It checks each (s)ATA line and if gets a valid response it can report it to the OS. Some BIOSes keep the order, so if some ATA line didnot respond its letter is left free (sda, sdb, sde, sdf). You can meet also multithreded BIOSes which ask all the lines at the same moment, and the letters are given in the order, the disk gives their responses. Hence you can easy get the new order each time you start the computer and some other after warm restart. That's why the boot procedure (e.g. the grub) does not care of the disk letters and looks for the proper volume UUID or volume LABEL. While using RAID, lot of RAID manager (e.g. mdadmin) writes somewhere on the disk space the metadata, which contains the whole inforamtion about the RAID member (mainly the RAID UUID, member UUID, member order etc.) The system can take this information prior to the BIOS info. The special rules can be also set by the UDEV subsystem where the disk letter can be assigned by for example the serial number of the harddisk.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.