Jobst Schmalenbach
2019-Mar-01 04:04 UTC
[CentOS] What files to edit when changing the sdX of hard drives?
On Thu, Feb 28, 2019 at 05:19:49PM +0100, Nicolas Kovacs (info at microlinux.fr) wrote:> Le 28/02/2019 ? 04:12, Jobst Schmalenbach a ?crit?: > > I want to lock in the SDA/SDB/SDC for my drives > > In short : use UUIDs or labels instead of hardcoding /dev/sdX.I **KNOW** how to use UUID's ... this is NOT the reason why I am doing this! I *NEED* the order of the disks to be SDA(1st BIOS drive) SDB(2nd BIOS drive) SDC(3rd BIOS drive) and not SDA (1st BIOS drive) SDB(3rd BIOS drive) SDC (2nd BIOS drive). Reason: it stuffs up the use of grub2* utilities leaving behind a bunch of error messages. The SDA (1st BIOS drive) and SDB (2nd BIOS drive) are part of a MDADM raid(1) system. As soon as I plug in the third drive, the OS (or systemD) decides to put it into the SDB spot - I do NOT want that. When I the use any of the grub2 utils I end up with "missing drive" errors. If I leave the drive out NO problem. I have managed twice to have the machine booting with the third drive as SDC, when that happens I I do not get any error messages. Jobst -- Why is the man who invests all your money called a broker? | |0| | Jobst Schmalenbach, General Manager | | |0| Barrett & Sales Essentials |0|0|0| +61 3 9533 0000, POBox 277, Caulfield South, 3162, Australia
Valeri Galtsev
2019-Mar-01 15:48 UTC
[CentOS] What files to edit when changing the sdX of hard drives?
On 2/28/19 10:04 PM, Jobst Schmalenbach wrote:> On Thu, Feb 28, 2019 at 05:19:49PM +0100, Nicolas Kovacs (info at microlinux.fr) wrote: >> Le 28/02/2019 ? 04:12, Jobst Schmalenbach a ?crit?: >>> I want to lock in the SDA/SDB/SDC for my drives >> >> In short : use UUIDs or labels instead of hardcoding /dev/sdX. > > I **KNOW** how to use UUID's ... this is NOT the reason why I am doing this! > > > I *NEED* the order of the disks to be SDA(1st BIOS drive) SDB(2nd BIOS drive) SDC(3rd BIOS drive) and not SDA (1st BIOS drive) SDB(3rd BIOS drive) SDC (2nd BIOS drive). > > Reason: it stuffs up the use of grub2* utilities leaving behind a bunch of error messages. > The SDA (1st BIOS drive) and SDB (2nd BIOS drive) are part of a MDADM raid(1) system. > > As soon as I plug in the third drive, the OS (or systemD) decides to put it into the SDB spot - I do NOT want that. > When I the use any of the grub2 utils I end up with "missing drive" errors.Try to switch physical connections of second and third drives, then you most likely will have the correct "BIOS" order of physical drives. As, as far as I understand, the letters are assigned in the order the bus scan discovers drives (or - though less likely - in reverse order, at least reverse order once was for network interfaces, like discovered ones were pushed into stack, and then used in the order they were popped out of the stack). Valeri> > If I leave the drive out NO problem. I have managed twice to have the machine booting with the third drive as SDC, when that happens I I do not get any error messages. > > > > Jobst > >-- ++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++
Jobst Schmalenbach
2019-Mar-04 00:03 UTC
[CentOS] What files to edit when changing the sdX of hard drives?
On Fri, Mar 01, 2019 at 09:48:55AM -0600, Valeri Galtsev (galtsev at kicp.uchicago.edu) wrote:> > > On 2/28/19 10:04 PM, Jobst Schmalenbach wrote: > > On Thu, Feb 28, 2019 at 05:19:49PM +0100, Nicolas Kovacs (info at microlinux.fr) wrote: > > > Le 28/02/2019 ? 04:12, Jobst Schmalenbach a ?crit?: > > > > I want to lock in the SDA/SDB/SDC for my drives > > > > > > In short : use UUIDs or labels instead of hardcoding /dev/sdX. > > > > I **KNOW** how to use UUID's ... this is NOT the reason why I am doing this! > > Try to switch physical connections of second and third drives, then you most > likely will have the correct "BIOS" order of physical drives. As, as far asIt seems I need to go that way as I learned that you cannot use UDEV to swtich the names of sdX as assigned by the kernel. You can only ADD (as in make an extra name) but not RENAME :-(. It's weird though even in the BIOS they are assigned SDA (mirror 1) SDB (mirror 2) SDC (extra rsync/backup drive). It's not nice, though. The problem arises because I will NEVER have a backup/rsync drive in a system when I do an install that includes resetting of partition tables of SOME of the drives - a backup drive is a holy grail. So I created the mirror (i.e. partitioning and starting mdadm) withou the backup drive. As soon as I put that one back in I cannot use and of the grub2 utils without those errors "missing drive" as suddenly the the mirrors are on SDA and SDC. So there must be some bug somewhere as the grub2 utils do not look at the UUIDs but somehow at the hardware sdX. Jobst -- Do Lipton Tea employees take coffee breaks? | |0| | Jobst Schmalenbach, General Manager | | |0| Barrett & Sales Essentials |0|0|0| +61 3 9533 0000, POBox 277, Caulfield South, 3162, Australia
Apparently Analagous Threads
- What files to edit when changing the sdX of hard drives?
- What files to edit when changing the sdX of hard drives?
- What files to edit when changing the sdX of hard drives?
- What files to edit when changing the sdX of hard drives?
- What files to edit when changing the sdX of hard drives?