# Seagate NAS drives - add quirks mode?



## aupanner (Oct 29, 2013)

Hi all,

Just updated my very old P4-based FreeBSD system to a moderately old Opteron-185 system.  As part of the update I added two 2T drives in a ZFS mirror.  I bought one each of the WDC Red and the Seagate NAS with the assumption that it lessens the chance of a systemic 2-drive death.  Did a 4K alignment.  Both drives run fine.

I noticed that the WDC reports itself as a 4K drive, but that the Seagate does not.


```
ada1: <WDC WD20EFRX-68AX9N0 80.00A80> ATA-9 SATA 3.x device
ada1: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
ada1: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
ada1: quirks=0x1<4K>

ada2: <ST2000VN000-1H3164 SC42> ATA-9 SATA 3.x device
ada2: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
ada2: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
```
Should this drive model be added to /sys/cam/ata/ata_da.c?  I'm not sure how the quirk setting is used by FreeBSD, but fwiw both drives are running fine.  If anything the Seagate is slightly faster (lower avg busy% from gstat) due to its (very) slightly higher rpm.


```
{       
         /* Seagate NAS drives */       
        { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST????VN*", "*" },      
         /*quirks*/ADA_Q_4K       
},
```


----------



## wblock@ (Oct 29, 2013)

What does `gpart list` show for the stripe size of both drives?


----------



## aupanner (Oct 29, 2013)

```
ada1: <WDC WD20EFRX-68AX9N0 80.00A80> ATA-9 SATA 3.x device
```


```
Geom name: ada1
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 3907029134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada1p1
   Mediasize: 110592 (108k)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   rawuuid: 5367d6e1-32cc-11e3-a263-0015f24b0fce
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: boot0
   length: 110592
   offset: 20480
   type: freebsd-boot
   index: 1
   end: 255
   start: 40
2. Name: ada1p2
   Mediasize: 8589934592 (8.0G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   rawuuid: 7118da99-32cc-11e3-a263-0015f24b0fce
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: swap0
   length: 8589934592
   offset: 131072
   type: freebsd-swap
   index: 2
   end: 16777471
   start: 256
3. Name: ada1p3
   Mediasize: 1991808847872 (1.8T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   rawuuid: 88b455f3-32cc-11e3-a263-0015f24b0fce
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
   label: disk0
   length: 1991808847872
   offset: 8590065664
   type: freebsd-zfs
   index: 3
   end: 3907029127
   start: 16777472
Consumers:
1. Name: ada1
   Mediasize: 2000398934016 (1.8T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r2w2e4
```


```
ada2: <ST2000VN000-1H3164 SC42> ATA-9 SATA 3.x device
```


```
Geom name: ada2
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 3907029134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada2p1
   Mediasize: 110592 (108k)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   rawuuid: 5a80e9ab-32cc-11e3-a263-0015f24b0fce
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: boot1
   length: 110592
   offset: 20480
   type: freebsd-boot
   index: 1
   end: 255
   start: 40
2. Name: ada2p2
   Mediasize: 8589934592 (8.0G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   rawuuid: 748ade9c-32cc-11e3-a263-0015f24b0fce
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: swap1
   length: 8589934592
   offset: 131072
   type: freebsd-swap
   index: 2
   end: 16777471
   start: 256
3. Name: ada2p3
   Mediasize: 1991808847872 (1.8T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   rawuuid: 8b7e1672-32cc-11e3-a263-0015f24b0fce
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
   label: disk1
   length: 1991808847872
   offset: 8590065664
   type: freebsd-zfs
   index: 3
   end: 3907029127
   start: 16777472
Consumers:
1. Name: ada2
   Mediasize: 2000398934016 (1.8T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r2w2e4
```


----------



## mav@ (Nov 1, 2013)

4K quirks are used when device does not report physical sector size correctly by itself. As I can see above, this Seagate does report it.


----------



## aupanner (Nov 3, 2013)

Thanks mav@


----------



## aupanner (Nov 8, 2013)

In case anyone eventually cares, the reason the WD Red drive is tagged with the 4k quirks mode is due to a overly-generous rule for the WD Green drives.


```
{
                /* WDC Caviar Green Advanced Format (4k) drives */
                { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD????RX*", "*" },
                /*quirks*/ADA_Q_4K
        },
```

This matches "WD20EFRX", the ID for the Red NAS-series drives.  The green drives are "WD\d{2}EARX" and "WD\d{2}EZRX".


----------



## mav@ (Nov 9, 2013)

But as I can see WD20EFRX really is 4K drive, so it is just minor comment mismatch. Isn't it?


----------



## aupanner (Nov 9, 2013)

That's right, it doesn't cause any harm.  I was just confused why, of two 4k drives, only one was reporting a quirk mode.


----------

