USB devices mess up Linux device enumeration

Our Dell PowerEdges were also giving us a headache with their built-in USB devices and virtual devices. While they are useful for maintenance and patching, they mess up the Linux kernel's device enumeration because they come first in that list, no matter where you put your local disk or HBA card in your boot order.

The Dell Virtual Flash and Virtual Floppy always become /dev/sda, /dev/sdb, respectivally. The local PERC disk then becomes /dev/sdc and our boot LUN on the SAN ends up at /dev/sdd. Turning the Dell devices on or off on BIOS then shuffles your devices around and suddenly your boot LUN will be sdb or sdc. No real danger, but /etc/fstab will no longer be valid and booting the system either gives you the maintenance shell or X1 will fail and you get a text login prompt (i.e. runlevel 3).

Two solutions...
One, you can use device labelling or udev naming to have the kernel trace the partitions it needs. However, a quick solutions is - during production - to turn off USB devices by appending a parameter to the kernel. Adding "nousbstorage" to your kernel line (in grub or on the console) solves the issue too.


Popular posts from this blog

Tuning the nscd name cache daemon

Preventing PuTTY timeouts

Debugging sudo and sudoers