More Linux fun - scsi driver load order

Posted by: rob

More Linux fun - scsi driver load order - 11/01/2005 01:56

Is it possible to force Linux to assign drivers for two scsi cards in a particular order *without* switching to modules? Since adding a second scsi controller to a server my scsi0 and scsi1 assignments are now backwards.

Ta

Rob
Posted by: mlord

Re: More Linux fun - scsi driver load order - 11/01/2005 02:01

Probably not.

But if you use volume labels instead of hardcoded device names in /etc/fstab, then the order won't matter to anything. Ditto for the even more modern LVM volumes.

Cheers
Posted by: rob

Re: More Linux fun - scsi driver load order - 11/01/2005 03:34

Thanks, that's handy! It doesn't work in grub or for swap, but it will simplify things each time the disk configuration changes.

Rob
Posted by: andym

Re: More Linux fun - scsi driver load order - 11/01/2005 06:55

I recently had this problem, I've got two SATA discs and a internal USB card reader. I found that the card reader was being detected first and being assigned sda through sdd and sde & sdf were the discs. I felt rather uneasy that a failure to detect the card reader on boot would mess up the allocation of the discs. I ended up compiling USB as modules and modprobing at startup, that way the discs are always sda and sdb.

EDIT: Looking at Marks post, I might give that a try, I'm using LVM but I've kept my / on a normal partition.
Posted by: JBjorgen

Re: More Linux fun - scsi driver load order - 11/01/2005 11:41

This may sound retarded, but have you tried changing the order of the scsi cards in the pci slots? I don't know how linux goes about detecting and assigning stuff, but methinks that used to work for dos/win9x.
Posted by: mlord

Re: More Linux fun - scsi driver load order - 11/01/2005 12:10

Oh yeah. Grub.. bleeding bootloaders can be so troublesome at times!

But yes, try rearranging the arrangement of SCSI adapter cards within PCI slots (if possible, more likely you've got some mainboard interfaces in this mess).

Actually, I'm not sure that Grub would be a big issue -- it needs a physical partition anyway, and uses BIOS drive numbering. So if Grub even loads from the "first" BIOS disk (0x80), then it should be able to find its own files on hd(0,*) without much issue -- just ensure that the kernel and initrd files are all under /boot on a physical partition with /boot/grub/* -- this is the default for most distros.

The root=xxx kernel parameter in grub.conf (or lilo.conf) can be anything, including a volume device path, or a LABEL=/ designation.

I had something similar go screwy on my WinXPpro install -- MS decided my flashcard reader slots each represented a disk drive, and lettered them all before the real drive. So my files are all now installed on drive "I:", but some of the default prompts when installing s/w still ask for "C:" and have to be fixed by hand each time.

Cheers
Posted by: tman

Re: More Linux fun - scsi driver load order - 11/01/2005 13:41

Quote:
I had something similar go screwy on my WinXPpro install -- MS decided my flashcard reader slots each represented a disk drive, and lettered them all before the real drive. So my files are all now installed on drive "I:", but some of the default prompts when installing s/w still ask for "C:" and have to be fixed by hand each time.


Ah yeah. The fun of built in card readers. Unplug them before installation and it'll be fine. Once you've installed Windows, you can plug them back in and they'll get detected and put into the proper place.
Posted by: bonzi

Re: More Linux fun - scsi driver load order - 11/01/2005 15:07

Quote:
I had something similar go screwy on my WinXPpro install -- MS decided my flashcard reader slots each represented a disk drive, and lettered them all before the real drive. So my files are all now installed on drive "I:", but some of the default prompts when installing s/w still ask for "C:" and have to be fixed by hand each time.

You might not know that one can change drive letter mapping in XP (contol panel, admin tools, computer management, disk management).
Posted by: tman

Re: More Linux fun - scsi driver load order - 11/01/2005 15:15

Don't think that works for the boot drive though.
Posted by: rob

Re: More Linux fun - scsi driver load order - 11/01/2005 16:29

Quote:
But yes, try rearranging the arrangement of SCSI adapter cards within PCI slots (if possible, more likely you've got some mainboard interfaces in this mess).

One of the controllers is a RAID card that has a direct interface with the on-board SCSI channels, so it has to be in a particular slot. Not a problem though, everything except swap is now set to update automatically if I reconfigure.

Quote:
The root=xxx kernel parameter in grub.conf (or lilo.conf) can be anything, including a volume device path, or a LABEL=/ designation.

That's the bit I didn't know - very useful!

It's all working nicely now, thanks for your help.

Rob
Posted by: mlord

Re: More Linux fun - scsi driver load order - 11/01/2005 17:41

Quote:
Quote:
>The root=xxx kernel parameter in grub.conf (or lilo.conf) can be anything, >including a volume device path, or a LABEL=/ designation.

That's the bit I didn't know - very useful!



I remember "discovering" this for myself the first time I installed FedoraCore onto a second partition on a system that also had Redhat9 on on the first partition..

Both of them use "root=LABEL=/", and both of them used "/" as the label for their root partitions.. so on reboot, grub loaded the Fedora kernels for me, but then tried to use the Redhat9 root partition.. duh!

I notice that FedoraCore3 seems to no longer be quite so dumb about it.

Cheers
Posted by: Memil

Re: More Linux fun - scsi driver load order - 14/01/2005 17:42

I think you could solve this with udev also, you can do amazing things there...
My usb-stick(former /dev/sda1) is always named /dev/cruzer now... :-)

... lvm rocks also, just reinstalled our mailserver to use lvm so we could use the snapshot-function to minimize the backuptime...

/Fredrik