From owner-freebsd-scsi@freebsd.org Tue Feb 16 15:23:30 2016 Return-Path: Delivered-To: freebsd-scsi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93D75AAA422 for ; Tue, 16 Feb 2016 15:23:30 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ob0-x22c.google.com (mail-ob0-x22c.google.com [IPv6:2607:f8b0:4003:c01::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5706D188D for ; Tue, 16 Feb 2016 15:23:30 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ob0-x22c.google.com with SMTP id wb13so263793034obb.1 for ; Tue, 16 Feb 2016 07:23:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=/KbkwsW93N9Vv2aTlYbayvbFZQfEojMb07+movbXb8I=; b=BNhG56HsC3NsPrv3b4VgUDld+CY1yZEYvSHI6NsOL+5MHgxqqalZ+1nwpVRm67Uy4p ryL4lG794j+X0b7oUcDRNJOobKk6AK5pgZ56xriY5lJ3CVpfXE9MpMJ7kExlcUmLLDRD t2MQSlESdsO1tzmtIMQg+vG2RoQjQsHjj4BDPLbFRE99wzmUUrKnQbDplQDH2+4lpbXr dhajGXOkn+GNLRQzsgoeXeDbXLJtVeLkMDIUbzMxjA8nBA5gOdYfAkzPLbeYsv9nhiPi 8Y4XC979xTtE2XrgcO0j8Txc/UCbJzp9oUXQKYVpJFNDJ79n26Ex6n0cF6GDlqSWhbOQ KW+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=/KbkwsW93N9Vv2aTlYbayvbFZQfEojMb07+movbXb8I=; b=mRHW+SJeb4IS7KFnyBg7JENEHFg/ZQ14ksftrUy1Q58FsDPSZYUxVzbm4LQJgBA4g9 jAGpM07xeZiG2KWRpKnFMvepZ1mEjbGhJnfWw0KVzkUHVU2nyHZ6f8YDt2DOh7ZKdN49 epk+cPbwO0d/bz8/KEKishqOolNcS2BR0Um8xumTXvkCXAcgI7SuhyGLpRDKZOc81tRH Jcf2wG/HlqGh2qPYkArbSXK68be88auRj3vevvm8PF5AzQTfxgZuYDssQZFXydRweobw n5yzCJGWZdGTaRT79Hr2q7iRcFsi/r3kqFxL4L31yAAxetpRPkX0/A/b8BM3GVNwkYuU 9q4Q== X-Gm-Message-State: AG10YOQobKCmHBwb5GdXGGh5EnZfUvfZsYOrgcJfxOcTET6L47xGbrgowWAzCJiCGHaplhaEd8gbzCK7ycZPZw== MIME-Version: 1.0 X-Received: by 10.60.127.166 with SMTP id nh6mr17182885oeb.64.1455636181657; Tue, 16 Feb 2016 07:23:01 -0800 (PST) Sender: asomers@gmail.com Received: by 10.202.78.83 with HTTP; Tue, 16 Feb 2016 07:23:01 -0800 (PST) In-Reply-To: References: Date: Tue, 16 Feb 2016 08:23:01 -0700 X-Google-Sender-Auth: c7paMePKHQPTOPfyDQmdN2wwtB4 Message-ID: Subject: Re: camcontrol sata affiliations From: Alan Somers To: David Ford Cc: "freebsd-scsi@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2016 15:23:30 -0000 On Tue, Feb 16, 2016 at 4:45 AM, David Ford wrote: > Hello, > > I have a number of dual homed SAS disk chasses, with a mixture of SAS and SATA drives. As expected, the SAS drives appear to both hosts, and the SATA drives appear on a single host, which gets the SAS affiliation. > > From the host with the SATA drive visible: > > [root@backup-san1 ~]# camcontrol smpphylist /dev/ses0 > 26 PHYs: > PHY Attached SAS Address > 0 0x0000000000000000 > 1 0x0000000000000000 > 2 0x50080e53c2b8f002 (da33,pass36) > 3 0x5000cca01ab1a139 (pass0,da0) > 4 0x0000000000000000 > 5 0x0000000000000000 > 6 0x0000000000000000 > 7 0x5000c50041affc01 (pass2,da2) > 8 0x0000000000000000 > 9 0x0000000000000000 > 10 0x5000cca03ea41585 (pass1,da1) > 11 0x0000000000000000 > 12 0x500605b004f24f20 > 13 0x500605b004f24f20 > 14 0x500605b004f24f20 > 15 0x500605b004f24f20 > 16 0x0000000000000000 > 17 0x0000000000000000 > 18 0x0000000000000000 > 19 0x0000000000000000 > 20 0x0000000000000000 > 21 0x0000000000000000 > 22 0x0000000000000000 > 23 0x0000000000000000 > 24 0x50080e53c2b8f03d > 25 0x000000000000003e > > From the other host: > > root@backup-san-02:~ # camcontrol smpphylist /dev/ses0 > 26 PHYs: > PHY Attached SAS Address > 0 0x0000000000000000 > 1 0x0000000000000000 > 2 0x0000000000000000 > 3 0x5000cca01ab1a13a (pass2,da1) > 4 0x0000000000000000 > 5 0x0000000000000000 > 6 0x0000000000000000 > 7 0x5000c50041affc02 (pass1,da0) > 8 0x0000000000000000 > 9 0x0000000000000000 > 10 0x5000cca03ea41586 (pass3,da2) > 11 0x0000000000000000 > 12 0x500605b004f27920 > 13 0x500605b004f27920 > 14 0x500605b004f27920 > 15 0x500605b004f27920 > 16 0x0000000000000000 > 17 0x0000000000000000 > 18 0x0000000000000000 > 19 0x0000000000000000 > 20 0x0000000000000000 > 21 0x0000000000000000 > 22 0x0000000000000000 > 23 0x0000000000000000 > 24 0x50080e53c1e1803d > 25 0x000000000000003e > > > I can successfully clear the affiliation: > > [root@backup-san1 ~]# camcontrol smppc /dev/ses0 -p 2 -o clearaffiliation > [root@backup-san1 ~]# smp_rep_phy_sata --phy=2 /dev/ses0 > Report phy SATA response: > expander change count: 74 > phy identifier: 2 > STP I_T nexus loss occurred: 0 > affiliations supported: 1 > affiliation valid: 0 > STP SAS address: 0x50080e53c2b8f002 > register device to host FIS: > 34 00 50 01 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 > affiliated STP initiator SAS address: 0x0 > STP I_T nexus loss SAS address: 0x0 > affiliation context: 0 > current affiliation contexts: 0 > maximum affiliation contexts: 1 > > However from the other host: > > root@backup-san-02:~ # camcontrol smppc /dev/ses0 -p 2 -o sataportsel > > appears to do nothing - the output of camcontrol smpphylist /dev/ses0 and it does not appear on a rescan, or if I attempt to hard reset it. > > root@backup-san-02:~ # smp_rep_phy_sata --phy=2 /dev/ses0 > Report phy SATA result: Phy does not support SATA > > The systems are running Freebsd 10.2, and I have tested with both the mps and the mpr driver on different systems, the behaviour is identical. > > Either I'm missing a crucial step in this process, or it's a bug. Does anyone have any suggestions. > > Thanks > > David > You aren't missing anything. This is just a difference between SATA and SAS. SAS drives have two ports, and SATA drives have only one. Most (all?) multipath JBODs like yours have two separate expander chips. They connect every slot's first port to the first expander and every slot's second port to the second expander. That results in a chassis with no SPOF. With such hardware, there's no way to connect a SATA drive to both servers. And with more complicated hardware that uses a single expander chip combined with SAS zoning to connect a SATA drive to two servers, you're stuck with a SPOF. -Alan