Attempting ATA TRIM on SAS devices?

Garrett Wollman wollman at csail.mit.edu
Wed Jan 8 23:38:39 UTC 2014


<<On Wed, 08 Jan 2014 16:07:59 -0500, Douglas Gilbert <dgilbert at interlog.com> 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.)

This drive reports:

[root at 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 at 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
      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]
[root at 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. 
[root at 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
[root at 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 at 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


My older drives (with the 2.15 firmware) are identical except that
they does not support VPD page 0xb2 (logical block provisioning).

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.)

-GAWollman


More information about the freebsd-scsi mailing list