Hi all, do you know if there is a way at boot time do disable specific LUN's on a SCSI bus of a particular controller? I'm trying to write an udev rule, but it seems that the system ignores the "vendor" model/name of the controller...
For example: I want to disable /dev/sdb; so I gather some information with udevinfo -a -p /sys/block/sdb and I try to use them to write
/etc/udev/rules.d/10-custom.rules
ID=="?:0:1:0", BUS=="scsi", DRIVER=="sd", SYSFS{model}=="DDYS-T36950N ", SYSFS{vendor}=="IBM ", OPTIONS="ignore_device", OPTIONS+="last_rule"
I put the "?" on the ID field because I know that the order of the controller can change (a kernel update could trigger the switch); also I tried with and without the spaces at the end of vendor and model: no change
Where am I wrong? It is a different way of doing this?
TIA Ciao Lorenzo
Lorenzo Quatrini wrote:
Hi all, do you know if there is a way at boot time do disable specific LUN's on a SCSI bus of a particular controller?
What do you need to do this for?
How about just echoing the command to /proc/scsi/scsi
echo "scsi remove-single-device X X X X" >/proc/scsi/scsi
get the values for the various X's from /proc/scsi/scsi e.g. Host: scsi0 Channel: 01 Id: 00 Lun: 00 Vendor: MegaRAID Model: LD 0 RAID1 69G Rev: 521S Type: Direct-Access ANSI SCSI revision: 02
would be 0 1 0 0
nate
2010/3/30 nate centos@linuxpowered.net:
Lorenzo Quatrini wrote:
Hi all, do you know if there is a way at boot time do disable specific LUN's on a SCSI bus of a particular controller?
What do you need to do this for?
How about just echoing the command to /proc/scsi/scsi
echo "scsi remove-single-device X X X X" >/proc/scsi/scsi
get the values for the various X's from /proc/scsi/scsi e.g. Host: scsi0 Channel: 01 Id: 00 Lun: 00 Vendor: MegaRAID Model: LD 0 RAID1 69G Rev: 521S Type: Direct-Access ANSI SCSI revision: 02
would be 0 1 0 0
nate
This is what I'm doing right now; but I was searching for a way of doing it earlier on startup. I'm playing with a non partitionable DS4300 FC, and I would like to avoid LUN contention.
Lorenzo
Lorenzo Quatrini wrote:
This is what I'm doing right now; but I was searching for a way of doing it earlier on startup. I'm playing with a non partitionable DS4300 FC, and I would like to avoid LUN contention.
Since it appears to be a SAN of sorts, another option may be to use the blacklist setting for dm-multipath, or if it's a fiber attached system you may be able to mask it at the controller itself using the vendor tools for the controller.
nate
2010/3/30 nate centos@linuxpowered.net:
Lorenzo Quatrini wrote:
This is what I'm doing right now; but I was searching for a way of doing it earlier on startup. I'm playing with a non partitionable DS4300 FC, and I would like to avoid LUN contention.
Since it appears to be a SAN of sorts, another option may be to use the blacklist setting for dm-multipath, or if it's a fiber attached system you may be able to mask it at the controller itself using the vendor tools for the controller.
I wish I could understand better IBM's tools... but as far I know I miss a (costly) option to be able to configure the whole thing from the controller. This is what I'm doing right now: using /proc/scsi/scsi to disable some luns and multipath to control which host sees what partition, but I was looking for a way to disable earlier during the boot the luns. Thank you again for your help Ciao Lorenzo
On Tue, 2010-03-30 at 15:58 +0200, Lorenzo Quatrini wrote:
2010/3/30 nate centos@linuxpowered.net:
Lorenzo Quatrini wrote:
Hi all, do you know if there is a way at boot time do disable specific LUN's on a SCSI bus of a particular controller?
What do you need to do this for?
How about just echoing the command to /proc/scsi/scsi
echo "scsi remove-single-device X X X X" >/proc/scsi/scsi
get the values for the various X's from /proc/scsi/scsi e.g. Host: scsi0 Channel: 01 Id: 00 Lun: 00 Vendor: MegaRAID Model: LD 0 RAID1 69G Rev: 521S Type: Direct-Access ANSI SCSI revision: 02
would be 0 1 0 0
nate
This is what I'm doing right now; but I was searching for a way of doing it earlier on startup. I'm playing with a non partitionable DS4300 FC, and I would like to avoid LUN contention.
Lorenzo
--- scsi_dev_flags SCSI black/white list. scsi_dev_flags=vendor:model:flags This option lets the user add entries to the SCSI black/white list for a specific vendor and model of device.
Dug it up from my notes. This goes on the kernel boot line.
John
JohnS ha scritto:
scsi_dev_flags SCSI black/white list. scsi_dev_flags=vendor:model:flags This option lets the user add entries to the SCSI black/white list for a specific vendor and model of device.
Dug it up from my notes. This goes on the kernel boot line.
For what I understand it help on enabling/disabling a whole device; I only need to disable some LUNS attached to a device... am I wrong? Can this be used to disable specific LUN?
Ciao Lorenzo
On Wed, 2010-03-31 at 14:41 +0200, Lorenzo Quatrini wrote:
JohnS ha scritto:
scsi_dev_flags SCSI black/white list. scsi_dev_flags=vendor:model:flags This option lets the user add entries to the SCSI black/white list for a specific vendor and model of device.
Dug it up from my notes. This goes on the kernel boot line.
For what I understand it help on enabling/disabling a whole device; I only need to disable some LUNS attached to a device... am I wrong? Can this be used to disable specific LUN?
I can be sure it has been a few years ago but you probly right in that respect.
The only other idea I know of is to run the Real Time Kernel on those Blades. Then you need the kernel tools installed. Pin down the specific intterupt that the LUN resides on and blacklist it for that specific scsi interface. I dont that that either will get you a per lun but they run on interrupts so they can be made to persistanly be disabled. cat /proc/interrupts will show it should but I must say i have never disable a LUN through it only NIC devices and moving them around to other CPUs.
You can use Nates idea also. It will work. Put you a script in rc.d to make it persistant. I have a feeling you will need it in boot order fashion though.
John