LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Linux SCSI devices keep moving every reboot (https://www.linuxquestions.org/questions/linux-hardware-18/linux-scsi-devices-keep-moving-every-reboot-741757/)

eaglek96 07-21-2009 01:57 PM

Linux SCSI devices keep moving every reboot
 
I'm posting here after weeks of trouble with this server, so I hope that someone here can help me shine some light on the problem.

A brief Synopsis:

The machine in question is used as a backup server using Bakbone Netvault and physical and virtual tape libraries. The problem I am having is that any time I reboot this particular machine, the SCSI devices are found in different orders. This causes the server either not to boot because it can't find root, or makes me reconfigure the software on the machine that mounts the tape drive if that moves to a different letter. For example, the disk found on /dev/sda1 which should be root may become /dev/sdb1 on the next reboot, and the tape library might take /dev/sda.

A little background:

The server in question is running Debian Lenny 2.6.26-2-686. It is a Dell Poweredge 1850 with the internal PERC RAID 0 card (using megaraid driver) and a pair of PCI LSI22320-R cards (one single channel and one dual channel using MPT Fusion).

The internal PERC SCSI card is the operating system disk with 2 80G drives mirrored with several partitions on it (sda1, sda2, etc..) The three MPT cards have a tape library (raw device), a Promise RAID array (/dev/sdb1, /dev/sdb2, etc..) , and a StorCase RAID array (/dev/sdc1).

When I boot this machine, I never know which order the drives will come up. At any given point, a reboot could cause the OS disk to be on /dev/sda, sdb, or sdc, with the others rotating around as well. Sometimes it takes several reboots before this machine boots with the correct combination where the root is found and the library is where it's expected.

I have changed only one option that I know of, changing the rootdelay in grub to 120 seconds, to help settle down the SCSI devices. While this helps, I still am terrified of rebooting this machine since they still change every few reboots.

I know I can also use labels to mount the individual partitions, so that even if the device names change, fstab will still find and mount them. This takes care of 75% of the problem, in that the OS disk and virtual libraries will mount OK. The problem that would still exist is that the backup software will still not be able to find the physical tape library, since I can't mount that by label.

Does anyone here know what I can do to help fix this? I have heard suggestions of changing things in the BIOS order, but that makes no difference since the initrd doesn't seem to care about that. The only other suggestion has been to remove the driver from the initrd image so that only one device (megaraid) is found at init.

I should mention, prior to putting Lenny on this machine, it was running Woody with a 2.4 kernel. It seemed to work OK in that configuration. I know several things have changed since the 2.4 days.

Thanks for any help, and please let me know if I have not provided enough info.

tredegar 07-21-2009 02:25 PM

Quote:

When I boot this machine, I never know which order the drives will come up.
A lot has changed since the 2.4 kernel. Changed for the better :)

udev should sort this out for you: http://www.reactivated.net/writing_udev_rules.html
udev works and is very elegant. It took me a while to get my head round it though.

Mounting static devices "by label" can be helpful too, but I see you have tried this where you can.

RAID devices terrify me - OK in principle, a nightmare when they fail (which, I know, they aren't supposed to) so I cannot offer advice.
Someone else probably can though.

Meanwhile, please take a look at udev

eaglek96 07-22-2009 09:49 PM

Thanks,

I'll take a look at udev and see what I can do. Does anyone have any sample udev scripts that they've written for their SCSI? It seems like it encompasses a lot of things and I'd love a "quickstart".


All times are GMT -5. The time now is 05:44 PM.