> I am also curious if anybody knows how to clearly define which 3ware
> disks are which /dev/sd* device? I have 12 identical drives set up in 6
> identical raid-1 arrays for this particular box, and I'd like to verify
> which disks belong to which linux device. I am mostly interested in
> knowing for sure which one is /dev/sda, since that drive has my OS on it
> (for now).


If you are confused about which disk is which, simply look in the /sys filesystem
entry for that disk.

[root@linux2 /]# cat /sys/block/sda/device/vendor

This is most likely a boot disk on a motherboard serial or parallel ata port.

[root@linux2 /]# cat /sys/block/sdb/device/vendor

This device is an older 3ware 5/6/7/8000 series raid unit or JBOD disk.

[root@linux2 /]# cat /sys/block/sdc/device/vendor

This device is a newer 3ware 9000 series raid unit or JBOD disk.

You can also look in /var/log/messages or 'dmesg' output to see which disk device
names (/dev/sda, etc) are assigned to which scsi devices (Host, Channel, ID, Lun):

scsi1 : 3ware Storage Controller
3w-xxxx: scsi1: Found a 3ware Storage Controller at 0x9c00, IRQ: 225.
  Vendor: 3ware     Model: Logical Disk 7    Rev: 1.2
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdb: 312581808 512-byte hdwr sectors (160042 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 00 00 00
SCSI device sdb: drive cache: write back w/ FUA
SCSI device sdb: 312581808 512-byte hdwr sectors (160042 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 00 00 00
SCSI device sdb: drive cache: write back w/ FUA
 sdb: sdb1 sdb2 < sdb5 >
sd 1:0:7:0: Attached scsi disk sdb

Above note the "scsi1: 3ware Storage Controller" line, which indicates
that the 3ware controller is on scsi "host 1".

Above you see that disk '/dev/sdb' was assigned by the OS to Host: 1, Channel: 0,
ID: 7, Lun: 0. as noted by the line:  "sd 1:0:7:0: Attached scsi disk sdb"

Therefore, you can tell that ID 7, (/dev/sdb) which is assigned to Host 1 is
attached to a 3ware controller.

Output from the tw_cli (3ware command line software) on the same system shows:

[root@linux2 /]# /root/tw_cli
//linux2> info

Ctl   Model        (V)Ports  Drives   Units   NotOpt  RRate   VRate  BBU
c1    8506-12      12        1        1       0       2       -      -       

Here we see "c1" Controller 1, which is the same as "scsi host 1" or "scsi1" in the
above output.

//linux2> info c1

Unit  UnitType  Status         %RCmpl  %V/I/M  Stripe  Size(GB)  Cache  AVrfy
u7    JBOD      OK             -       -       -       149.051   ON     -     

Port   Status           Unit   Size        Blocks        Serial
p0     NOT-PRESENT      -      -           -             -
p1     NOT-PRESENT      -      -           -             -
p2     NOT-PRESENT      -      -           -             -
p3     NOT-PRESENT      -      -           -             -
p4     NOT-PRESENT      -      -           -             -
p5     NOT-PRESENT      -      -           -             -
p6     NOT-PRESENT      -      -           -             -
p7     OK               u7     149.05 GB   312581808     WD-WCANM1024184    
p8     NOT-PRESENT      -      -           -             -
p9     NOT-PRESENT      -      -           -             -
p10    NOT-PRESENT      -      -           -             -
p11    NOT-PRESENT      -      -           -             -

Here we see "u7" or "unit id 7" which is the same as "ID 7" in the above
output.  Therefore we can conclude that 3ware controller ID 1, unit 7 on port 7
is in fact /dev/sdb.


CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and contains information that is confidential and proprietary to Applied Micro Circuits Corporation or its subsidiaries. It is to be used solely for the purpose of furthering the parties' business relationship. All unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.