Doing bus rescans to discover new LUNs

We discovered a serious issue when rescanning the SCSI bus on (Oracle/Red Hat) Linux to discover newly added LUNs and I thought I'd mention it here.

Our (old) Dell PowerEdge 2950 come with virtual media to allow mounting virtual floppy images (for driver disks, e.g.) and virtual CDs (great for ISOs). Dell adds these devices to the USB SCSI bus and therefore they show up as /dev/sda and /dev/sdb. I.e. before any regular (boot) media. While it makes sense, it creates a problem for us when adding new SAN LUNs to an existing Oracle database server, because we need to add some ASM disks.

When doing the bus rescan
echo "- - -" > /sys/class/scsi_host/host3/scan
the virtual media get enumerated again as sda and sdb, which throws off existing device mapping. Our boot LUN which was sdb is now sdd and that used to be an ASM disk. After initialization with ASM, my boot LUN gets wiped and things get ugly. No root device, read-only access and upon reboot grub fails because boot devices are lost. Enter panic mode!

I can think of two three possible work-arounds:
1) rescan only the FC SCSI busses i.e. echo "1 - -" or something
2) Use Qlogic's HBA utilities to rescan and hopefully prevent the Dell virtual media from appearing
3) Using udev to prevent disk IDs from getting "lost" as udev IDs are unique, always, by design.

I'll let you know what happens... BTW, we are using OEL 4u5 x86_64 on our servers.


Popular posts from this blog

Tuning the nscd name cache daemon

Preventing PuTTY timeouts

Debugging sudo and sudoers