Re: [PATCH] path_id: Handle SAS and SATA devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, Jul 12, 2010 at 10:47 AM, David Zeuthen <davidz@xxxxxxxxxx> wrote:
> On Mon, 2010-07-12 at 11:07 +0200, Kay Sievers wrote:
>> On Wed, Jul 7, 2010 at 16:55, Hannes Reinecke <hare@xxxxxxx> wrote:
>> >
>> > SAS devices should be referenced by the SAS address of the target;
>> > on the initiator side we assume an identity mapping between SAS
>> > addresses and PCI devnumber.
>> > SATA devices have an identity mapping between SATA links and
>> > linux scsi_host structures, so we can map the host number onto
>> > the SATA link.
>> > For this to work the LUN numbering needs to be updated, too,
>> > as SATA devices do not have the concept of a LUN, whereas normal
>> > SCSI devices have.
>>
>> David, any chance to give this a try on your SAS box, and see if this
>> works as expected for you too?
>
> Sure, will do later this week - it's currently powered off and in a
> moving box!

OK, I get these additional links in /dev/disk/by-path

+│   ├── pci-0000:06:00.0-sas-0x500000e01b83f362-lun-0x0000000000000000
-> ../../sds
+│   ├── pci-0000:06:00.0-sas-0x500000e01b83f363-lun-0x0000000000000000
-> ../../sdr
+│   ├── pci-0000:06:00.0-sas-0x500000e01b83f442-lun-0x0000000000000000
-> ../../sdq
+│   ├── pci-0000:06:00.0-sas-0x500000e01b83f443-lun-0x0000000000000000
-> ../../sdp
+│   ├── pci-0000:06:00.0-sas-0x500000e01b83f522-lun-0x0000000000000000
-> ../../sdo
+│   ├── pci-0000:06:00.0-sas-0x500000e01b83f523-lun-0x0000000000000000
-> ../../sdn
+│   ├── pci-0000:06:00.0-sas-0x500000e01b843d92-lun-0x0000000000000000
-> ../../sdm
+│   └── pci-0000:06:00.0-sas-0x500000e01b843d93-lun-0x0000000000000000
-> ../../sdl

for four SAS disks with two paths each. Btw, the WWN used is
apparently not that of the actual disk

 # udevadm info -q all -n /dev/sdn|grep ID_WWN=
 E: ID_WWN=0x500000e01b83f520

which matches what is printed on the actual disk

 http://people.freedesktop.org/~david/FUJITSU-MAY2036RC-sas-disk-picture.jpg

however the WWNs that your patch introduces differ from this. However
those WWNs appear here

 # smp_discover /dev/bsg/expander-7\:0 --multiple |grep b83f52
 phy   4:T:attached:[500000e01b83f523:01  t(SSP)]  3 Gbps
 # smp_discover /dev/bsg/expander-7\:1 --multiple |grep b83f52
 phy   4:T:attached:[500000e01b83f522:00  t(SSP)]  3 Gbps

e.g. the WWNs that you use are the WWNs of the actual ports, not the
LUN itself, yes? You should probably use the LUN WWN instead. I mean,
I think people are interested in the WWN of the LUN and they don't
care so much about the WWN of the ports. Or maybe we want both?
Anyway, I *think* that's the way it works but I could be wrong on some
of the SAS details.

FWIW, I've included sg_inq(8) output in [1] for both paths to the disk.

    David

[1] :

# sg_inq /dev/sdo --page 0x83
VPD INQUIRY: Device Identification page
  Designation descriptor number 1, descriptor length: 12
    designator_type: NAA,  code_set: Binary
    associated with the addressed logical unit
      NAA 5, IEEE Company_id: 0xe
      Vendor Specific Identifier: 0x1b83f520
      [0x500000e01b83f520]
  Designation descriptor number 2, descriptor length: 12
    transport: Serial Attached SCSI (SAS)
    designator_type: NAA,  code_set: Binary
    associated with the target port
      NAA 5, IEEE Company_id: 0xe
      Vendor Specific Identifier: 0x1b83f522
      [0x500000e01b83f522]
  Designation descriptor number 3, descriptor length: 8
    transport: Serial Attached SCSI (SAS)
    designator_type: Relative target port,  code_set: Binary
    associated with the target port
      Relative target port: 0x1
  Designation descriptor number 4, descriptor length: 28
    designator_type: SCSI name string,  code_set: UTF-8
    associated with the target device that contains addressed lu
      SCSI name string:
      naa.500000E01B83F520

# sg_inq /dev/sdn --page 0x83
VPD INQUIRY: Device Identification page
  Designation descriptor number 1, descriptor length: 12
    designator_type: NAA,  code_set: Binary
    associated with the addressed logical unit
      NAA 5, IEEE Company_id: 0xe
      Vendor Specific Identifier: 0x1b83f520
      [0x500000e01b83f520]
  Designation descriptor number 2, descriptor length: 12
    transport: Serial Attached SCSI (SAS)
    designator_type: NAA,  code_set: Binary
    associated with the target port
      NAA 5, IEEE Company_id: 0xe
      Vendor Specific Identifier: 0x1b83f523
      [0x500000e01b83f523]
  Designation descriptor number 3, descriptor length: 8
    transport: Serial Attached SCSI (SAS)
    designator_type: Relative target port,  code_set: Binary
    associated with the target port
      Relative target port: 0x2
  Designation descriptor number 4, descriptor length: 28
    designator_type: SCSI name string,  code_set: UTF-8
    associated with the target device that contains addressed lu
      SCSI name string:
      naa.500000E01B83F520
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux