Link to home
Start Free TrialLog in
Avatar of Statebank Admin
Statebank Admin

asked on

/dev/sda changes to /dev/sdb after a reboot

Dell R940 Raid1 240Gb boss controller and 1.8TB ata RAID10 disks. The 240Gb boss controller installed oracle linux 7.6 installed. On the other hand, the OS installed disk has been automatically changed to /dev/sda or /dev/sdb or /dev/sdc every reboot. How to set this up always by sda?
Avatar of skullnobrains
skullnobrains

you cannot.
raid controllers sometimes do as they please, and static numbering of drives in linux is in it's early baby steps. and actually much worse since they try to make them static.

assuming the problem is with fstab, you can use UUIDs for your partitions so you need not know which sd the drive is.
likewise booting issues are easy to alleviate in most boot loaders using UUIDs.
Use the BLKID command to find out the UUIDs of the partitions and replace references to /dev/sdx volumes with the UUIDS instead.

/etc/fstab
UUID=<uuid number> <mount-point> <fs type> <options>
As skullnobrains suggests, best let your RAID controller do as it pleases.

If you trying playing /etc/fstab games, you can end up with a damaged RAID array + all your data corrupt + beyond all repair.

If you think you must mess with your disks, ensure your backup system is working well, because each time your system boots, you'll run the risk of 100% data destruction.

Hint: Mention why you care about physical disk assignments or what your trying to accomplish. Likely someone can assist you, if they know more.
look at the RIAD config it has to present something for the linux to see it as /dev/sda

At some point there was a tool to lock references by minor, major references but that was target for SAN presented LUNs not for "Direct attached" as you have it.
For SAns the enumeration and reason the reference changed were based on how quickly which lun was presented/showed up ....

Double check in the RAID controller which volume is set to be the boot.
You may have logical volume 1 RAID1 240
but configured volume 2 to be the primary boot reference when it falls through on the RAID10 it goes to the RAID1...

as noted the /etc/grub.conf might reference the UUID and thus finds it no matter the assignment.

I am unfamiliar with the boss controller on whether it is or is not a "software type RAID

do you have the dell controller utility instalked?
https://www.dell.com/support/home/us/en/04/drivers/driversdetails?driverid=0x4g8
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.