udev very slow
I have about 1280 SAN devices (disks) presented to a server running RedHat AS4 Update 5 64 bit. When I configure the udev rules file to use wild cards to match up with the output from the SCSI_ID command it takes hours (5-6) to reboot my system. I can create a rule file that is very fast on a reboot by getting rid of the wild cards and putting in the currently linked device names. This works as long as my devices don't change but it is not dynamic anymore and I think udev was meant to be dynamic.
KERNEL="sd*[!0-9]", PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab1200910000000000000000ef00", SYMLINK="disk/OS/sdxi"
KERNEL="sd*[!0-9]", PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab1200920000000000000000ef00", SYMLINK="disk/OS/sdxj"
KERNEL="sd*[!0-9]", PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab1200930000000000000000ef00", SYMLINK="disk/OS/sdxk"
KERNEL="sd*[!0-9]", PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab1200940000000000000000ef00", SYMLINK="disk/OS/sdxl"
KERNEL="sd*[!0-9]", PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab1200950000000000000000ef00", SYMLINK="disk/OS/sdxm"
KERNEL="sd*[!0-9]", PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab1200960000000000000000ef00", SYMLINK="disk/OS/sdxn"
KERNEL="sdbh" , PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab10003b0000000000000000ef00", SYMLINK="disk/ora/sdbh"
KERNEL="sdbh1", PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab10003b0000000000000000ef00", SYMLINK="disk/ora/sdbh1"
KERNEL="sdbi" , PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab10003c0000000000000000ef00", SYMLINK="disk/ora/sdbi"
KERNEL="sdbi1", PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab10003c0000000000000000ef00", SYMLINK="disk/ora/sdbi1"
KERNEL="sdbj" , PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab10003d0000000000000000ef00", SYMLINK="disk/ora/sdbj"
KERNEL="sdbj1", PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab10003d0000000000000000ef00", SYMLINK="disk/ora/sdbj1"
KERNEL="sdbk" , PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab10003e0000000000000000ef00", SYMLINK="disk/ora/sdbk"
KERNEL="sdbk1", PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab10003e0000000000000000ef00", SYMLINK="disk/ora/sdbk1"
KERNEL="sdbl" , PROGRAM="/sbin/scsi_id", RESULT="0HP OPEN-E 50060e80039dab10003f0000000000000000ef00", SYMLINK="disk/ora/sdbl"
The above excerpts from my configuration files should explain what I am talking about.
In the fist set of lines there are wild cards in the "KERNEL" field. This allows me to reference the same path forever (ex. /dev/disk/OS/sdx1) for each device. This is the way it should be done but it is very slow.
The second set of lines are the work around that solves the problem but it won't work if the OS finds things in a different order. If that happens then /dev/sdbk will now be another name, maybe /dev/sdbr so the link will never be created.
Does anyone have any ideas on how to make this faster?
Thanks
|