From owner-freebsd-scsi@FreeBSD.ORG Thu Jan 9 00:25:00 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 048C4687 for ; Thu, 9 Jan 2014 00:25:00 +0000 (UTC) Received: from smtp.infotech.no (smtp.infotech.no [82.134.31.41]) by mx1.freebsd.org (Postfix) with ESMTP id 7D7E81152 for ; Thu, 9 Jan 2014 00:24:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.infotech.no (Postfix) with ESMTP id CF7932041CC; Thu, 9 Jan 2014 01:24:56 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.6.6 (20110518) (Debian) at infotech.no Received: from smtp.infotech.no ([127.0.0.1]) by localhost (smtp.infotech.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9mUybyHGQIHJ; Thu, 9 Jan 2014 01:24:54 +0100 (CET) Received: from [192.168.48.66] (unknown [216.99.48.99]) by smtp.infotech.no (Postfix) with ESMTPA id 023EA204169; Thu, 9 Jan 2014 01:24:53 +0100 (CET) Message-ID: <52CDEC3F.9000001@interlog.com> Date: Wed, 08 Jan 2014 19:24:31 -0500 From: Douglas Gilbert User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Garrett Wollman Subject: Re: Attempting ATA TRIM on SAS devices? References: <21197.39676.138433.937002@khavrinen.csail.mit.edu> <430F34AB88D44C4BAF31DDC7AD214137@multiplay.co.uk> <52CDBE2F.5030500@interlog.com> <21197.57725.503538.512849@khavrinen.csail.mit.edu> In-Reply-To: <21197.57725.503538.512849@khavrinen.csail.mit.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: dgilbert@interlog.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2014 00:25:00 -0000 On 14-01-08 06:38 PM, Garrett Wollman wrote: > < said: > >> A SATA disk with a SCSI to ATA Translation Layer (SATL) >> in front of it can look like a SCSI disk. If the >> SATL is well written such as the ones found in >> LSI SAS HBAs then VPD page 0x89 ("ATA Information") will >> be present. > > This is not a SATA disk, although the underlying flash controller may > well be a SATA emulator. (I believe the hardware is mostly shared > between Talos 2 and Deneva 2 platforms.) Interesting. > This drive reports: > > [root@nfs-prod-3 /export]# sg_vpd -l -p sn /dev/da12 > Unit serial number VPD page: > [PQual=0 Peripheral device type: disk] > Unit serial number: A179E011337000251 > [root@nfs-prod-3 /export]# sg_vpd -l -p di /dev/da12 > Device Identification VPD page: > [PQual=0 Peripheral device type: disk] > Addressed logical unit: > designator type: NAA, code set: Binary > NAA 5, IEEE Company_id: 0xe83a97 IEEE OUI database reports: E8-3A-97 (hex) OCZ Technology Group > Vendor Specific Identifier: 0xa101b6024 > [0x5e83a97a101b6024] > Target port: > designator type: NAA, code set: Binary > transport: Serial Attached SCSI Protocol (SPL-2) > NAA 5, IEEE Company_id: 0xe83a97 > Vendor Specific Identifier: 0xa101b6025 > [0x5e83a97a101b6025] > designator type: Relative target port, code set: Binary > transport: Serial Attached SCSI Protocol (SPL-2) > Relative target port: 0x1 > Target device that contains addressed lu: > designator type: NAA, code set: Binary > transport: Serial Attached SCSI Protocol (SPL-2) > NAA 5, IEEE Company_id: 0xe83a97 > Vendor Specific Identifier: 0xa101b6024 > [0x5e83a97a101b6024] Target device NAA and LU NAA are the same. That is a no-no in SAS. Sloppy. > [root@nfs-prod-3 /export]# sg_vpd -l -p ai /dev/da12 > ATA information VPD page: > [PQual=0 Peripheral device type: disk] > SAT Vendor identification: OCZ > SAT Product identification: LUIGI_V2_MGT > SAT Product revision level: ST00 > Signature (Device to host FIS): > 00 34 00 50 01 01 00 00 00 00 00 00 00 01 00 00 00 4.P............. > 10 00 00 00 00 .... > ATA command IDENTIFY DEVICE response summary: > model: TALOS2 > serial number: A179E011337000251 > firmware revision: 2.25 > ATA command IDENTIFY DEVICE response in hex: > 00 0c5a 3fff c837 0010 0000 0000 003f 0000 .Z ?. .7 .. .. .. .? .. > 08 0000 0000 4131 3739 4530 3131 3333 3730 .. .. A1 79 E0 11 33 70 > 10 3030 3235 3120 2020 0000 0000 0004 322e 00 25 1 .. .. .. 2. > 18 3235 2020 2020 5441 4c4f 5332 2020 2020 25 TA LO S2 > 20 2020 2020 2020 2020 2020 2020 2020 2020 > 28 2020 2020 2020 2020 2020 2020 2020 8010 .. > 30 4000 2f00 4000 0200 0200 0007 3fff 0010 @. /. @. .. .. .. ?. .. > 38 003f fc10 00fb 0110 4bb0 0df9 0000 0007 .? .. .. .. K. .. .. .. > 40 0003 0078 0078 0078 0078 4200 0000 0000 .. .x .x .x .x B. .. .. > 48 0000 0000 0000 001f c70e 0006 0044 0040 .. .. .. .. .. .. .D .@ > 50 01fc 0110 746b 7469 6163 7409 b449 6163 .. .. tk ti ac t. .I ac > 58 207f 0001 0000 00fe fffe 0000 0000 0000 . .. .. .. .. .. .. .. > 60 0000 0000 0000 0000 4bb0 0df9 0000 0000 .. .. .. .. K. .. .. .. > 68 0000 0001 4000 0000 5e83 a97a 101b 6024 .. .. @. .. ^. .z .. `$ > 70 0000 0000 0000 0000 0000 0000 0000 401a .. .. .. .. .. .. .. @. > 78 4018 0000 0000 0000 0000 0000 0000 0000 @. .. .. .. .. .. .. .. > 80 0001 4f24 4e89 0400 0102 0002 000e 0000 .. O$ N. .. .. .. .. .. > 88 0000 0104 0100 0000 0000 0000 0000 0000 .. .. .. .. .. .. .. .. > 90 0000 0000 0000 0000 0000 0000 0000 0000 .. .. .. .. .. .. .. .. > 98 0000 0000 0000 0000 0000 0000 0000 3600 .. .. .. .. .. .. .. 6. > a0 0000 0000 0000 0000 0000 0000 0000 0000 .. .. .. .. .. .. .. .. > a8 0000 0001 0000 0000 0000 0000 0000 0000 .. .. .. .. .. .. .. .. > b0 0000 0000 0000 0000 0000 0000 0000 0000 .. .. .. .. .. .. .. .. > b8 0000 0000 0000 0000 0000 0000 0000 0000 .. .. .. .. .. .. .. .. > c0 0000 0000 0000 0000 0000 0000 0000 0000 .. .. .. .. .. .. .. .. > c8 0000 0000 0000 0000 0000 0000 0021 0000 .. .. .. .. .. .. .! .. > d0 0000 4000 0000 0000 0100 0000 0000 0000 .. @. .. .. .. .. .. .. > d8 0000 0001 0000 0000 0000 0000 103f 0000 .. .. .. .. .. .. .? .. > e0 0000 0000 0000 0000 0000 0000 0000 0000 .. .. .. .. .. .. .. .. > e8 0000 0000 0000 0000 0000 0000 0000 0000 .. .. .. .. .. .. .. .. > f0 0000 0000 0000 0000 0000 0000 0000 0000 .. .. .. .. .. .. .. .. > f8 0000 0000 0000 0000 0000 0000 0000 32a5 .. .. .. .. .. .. .. 2. There is the WWN on line 0x68: 5e83 a97a 101b 6024 > [root@nfs-prod-3 /export]# sg_vpd -l -p bl /dev/da12 > Block limits VPD page (SBC): > [PQual=0 Peripheral device type: disk] > Write same no zero (WSNZ): 0 > Maximum compare and write length: 0 blocks > Optimal transfer length granularity: 0 blocks > Maximum transfer length: 0 blocks > Optimal transfer length: 0 blocks > Maximum prefetch length: 0 blocks > Maximum unmap LBA count: 4294967295 > Maximum unmap block descriptor count: 256 > Optimal unmap granularity: 32 > Unmap granularity alignment valid: 0 > Unmap granularity alignment: 0 > Maximum write same length: 0x0 blocks Many of those "0 blocks" should probably read "unlimited" Might look at that. > [root@nfs-prod-3 /export]# sg_vpd -l -p bdc /dev/da12 > Block device characteristics VPD page (SBC): > [PQual=0 Peripheral device type: disk] > Non-rotating medium (e.g. solid state) > Product type: Not specified > WABEREQ=0 > WACEREQ=0 > Nominal form factor not reported > FUAB=0 > VBULS=0 > [root@nfs-prod-3 /export]# sg_vpd -l -p lbpv /dev/da12 > Logical block provisioning VPD page (SBC): > [PQual=0 Peripheral device type: disk] > Unmap command supported (LBPU): 1 > Write same (16) with unmap bit supported (LBWS): 0 > Write same (10) with unmap bit supported (LBWS10): 0 > Logical block provisioning read zeros (LBPRZ): 0 > Anchored LBAs supported (ANC_SUP): 0 > Threshold exponent: 1 > Descriptor present (DP): 0 > Provisioning type: 0 Grrr, LBPRZ=0 which implies read rubbish from trimmed (unmapped) blocks. > My older drives (with the 2.15 firmware) are identical except that > they does not support VPD page 0xb2 (logical block provisioning). So it looks like they have put a SAS target chip directly in front of what is otherwise a SATA SSD. > In contrast, a different SSD (STec ZeusRAM) supports the following VPD > pages: > Supported VPD pages VPD page: > [PQual=0 Peripheral device type: disk] > 0x00 Supported VPD pages [sv] > 0x3 > 0x80 Unit serial number [sn] > 0x83 Device identification [di] > 0x86 Extended inquiry data [ei] > 0x87 Mode page policy [mpp] > 0x88 SCSI ports [sp] > 0xb1 Block device characteristics (SBC) [bdc] > 0xc0 > 0xdb > > (However, sg_vpd returns "page length too short" for 0xb1.) sg_vpd -H -vvv -p 0xb1 might show what is returned (in hex). At least Hitachi is breaking away from these silly games with a 12 Gbps SAS-3 SSD whose maximum read rate is around 1100 MB/sec. SATA won't be going to 12 Gbps, SAS is already there and looking at 24 Gbps (or maybe 20 Gbps ...). A SAS-3 SSD could theoretically read 2400 MB/sec aggregate with its two phys doing separate READs on its 2-phy, wide port. So it's between PCIe (SOP ?) and SAS for high end SSDs. Doug Gilbert