Hi,

how to query scsi id or wwn for a scsi disk in OpenBSD? I'd like to get this
info and extend installer to provide more info about disks (because currently
it's imposible to distinguish between scsi disks if they are same size and
originate from same iscsi target and passed to OpenBSD via qemu-kvm).

Currently OpenBSD does show for such SCSI disk something like (taken from 
disklabel):

...
Which disk is the root disk? ('?' for details) [sd0] ?
sd0: Celerra (20.0G)
     ^^^^^^^  ^^^^^

# scsi -f /dev/rsd0c -c "12 0 0 0 64 0" -i 0x64 "s8 z8 z16 z4"
EMC Celerra 0002

So what's OpenBSD equivalent scsi query for Linux commands?

# lsscsi -iws | tail -n1
[6:0:0:10]   disk    0x6006048c8f0ff1a5c7ef85c8d1c95  /dev/sdd   
36006048c8f0ff1a5c7ef85c8d1c95481  16.1GB

# /usr/lib/udev/scsi_id -xg /dev/sdd
ID_SCSI=1
ID_VENDOR=EMC
ID_VENDOR_ENC=EMC\x20\x20\x20\x20\x20
ID_MODEL=Celerra
ID_MODEL_ENC=Celerra\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_REVISION=0002
ID_TYPE=disk
ID_SERIAL=36006048c8f0ff1a5c7ef85c8d1c95481
ID_SERIAL_SHORT=6006048c8f0ff1a5c7ef85c8d1c95481
ID_WWN=0x6006048c8f0ff1a5
ID_WWN_VENDOR_EXTENSION=0xc7ef85c8d1c95481
ID_WWN_WITH_EXTENSION=0x6006048c8f0ff1a5c7ef85c8d1c95481
ID_SCSI_SERIAL=EMC-Celerra-iSCSI-VLU-fs179_T5_LUN10_CKM00120100230

Thank you for help, it would help me playing with iscsi luns on OpenBSD.

j.

Reply via email to