View previous topic :: View next topic |
Author |
Message |
gr0x0rd Guru
Joined: 12 Aug 2006 Posts: 311
|
Posted: Thu Sep 06, 2012 9:41 pm Post subject: Device naming assignments |
|
|
Hello all,
By editing udev rules, I've been able to shuffle devices around (such as renaming eth1 to eth0 after installing a new ethernet adapter).
Currently, I have a system with 6 SATA hard disks and an eSATA port. Sata ports 1-2 contain SSD disks in a RAID1 configuration containing /boot, swap and /. Sata ports 3-6 contain 4x2TB HDD disks in a RAID5 configuration containing /home .
I noticed that despite this, the kernel has identified the HDD in port 3 as /dev/sdb . The first time I configured my grub.conf, I only had the SSD drives connected to the system, so the devices were logically /dev/sda and /dev/sdb. After connecting the initial drives, the drive in port 3 bumped the drive in port 2 to /dev/sdc. The system still booted, but I had to manually resynchronize the RAID1 for /: thankfully this didn't take long due to the speed of the SSDs. Thankfully, mdadm is smart enough to assemble arrays based on the superblock contents, so only what is defined in the grub.conf is susceptible to getting "bumped" when drives are present/not present.
Enter the eSATA port. I powered down my system, and without thinking of any consquence, connected an external backup drive. On boot, the kernel detected this drive as /dev/sda! Of course, because of the other ordering, there's no longer a /dev/sdb listed, so the "shuffling" results in a non-bootable system.
Have any others run into this? From the googling I've done, I've seen the only way to solidify the way devices are named is by doing some fairly significant kernel hacking. Is there another (graceful) way to reserve names for devices when detected at boot by the kernel?
Thanks for reading. _________________ ~g
emerge -FML... |
|
Back to top |
|
|
Mad Merlin Veteran
Joined: 09 May 2005 Posts: 1155
|
Posted: Fri Sep 07, 2012 4:45 am Post subject: |
|
|
Where do you need literal device names like that? I have / and /boot on RAID, and do something like so for grub:
Code: |
title Gentoo 3.4.3
root (hd0,0)
kernel /boot/kernel-3.4.3-gentoo root=/dev/md1
|
Now, admittedly, all of my drives have grub installed on them, so the drive order doesn't matter at all.
However, if you have no MBR on the unbootable drives, shouldn't the system continue on to the next (several) drive(s) to try and boot from (them)?
In a number of other systems I manage, the drives have been shuffled around numerous times and still booted fine (despite not all drives being bootable). I'm fairly sure at least once an unbootable drive ended up as /dev/sda with no issues. _________________ Game! - Where the stick is mightier than the sword! |
|
Back to top |
|
|
VoidMage Watchman
Joined: 14 Oct 2006 Posts: 6196
|
Posted: Fri Sep 07, 2012 4:49 pm Post subject: |
|
|
It seems you're asking the wrong question.
You should probably look at selecting boot device by UUID or (if you're using GPT partitions) PARTUUID |
|
Back to top |
|
|
BillWho Veteran
Joined: 03 Mar 2012 Posts: 1600 Location: US
|
Posted: Fri Sep 07, 2012 7:27 pm Post subject: |
|
|
gr0x0rd.
I encountered a similar situation with a Dell workstation a couple of years ago. The BIOS SATA operation was set to RAID Autodetect / ATA - I switched it to RAID Autodetect / AHCI and that rectified the problem. _________________ Good luck
Since installing gentoo, my life has become one long emerge |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|