[dm-devel] Linux utility to determine WWN from a LUN number

lemons_terry at emc.com lemons_terry at emc.com
Fri Mar 14 02:50:34 UTC 2008


>lemons_terry at emc.com [lemons_terry at emc.com] wrote:
>> Hi
>> 
>> I want to have multipath manage only the CLARiiON LUN that I boot
from (LUN 0).  So I know that I can specify the following in
/etc/multipath.conf:
>> 
>> blacklist {
>> 	wwid *
>> 	}
>> blacklist_exceptions {
>> 	wwid nnnnnnnnnn
>> 	}
>> 
>> The wwid value is different for every CLARiiON LUN.  So, if I want to
automate the process of adding the 'wwid' value to the blacklist, what
utility can I use to specify a LUN number, and find the WWN of the LUN?
>> 
>> Thanks!
>> tl
>
>lsscsi, lists all your SCSI devices. It should have LUN number and
>device name. You can use scsi_id to get WWN. lsscsi uses "sysfs" file
>system (/sys/class/scsi_device/ etc), so you should be able to write
>your own to suite your exact needs.

Sorry, but doesn't scsi_id only return what it finds in SCSI VPD pages
80 or 83?  Not all devices provide a WWN in VPD page 83.

tl




More information about the dm-devel mailing list