Understanding ASHIFT SSD and adding a mirrored vdev

Michael Jung mikej at mikej.com
Thu May 15 13:35:00 UTC 2014


On , Steven Hartland wrote:
> ----- Original Message ----- From: "Michael Jung" <mikej at mikej.com>
> To: <freebsd-fs at freebsd.org>
> Sent: Thursday, May 15, 2014 1:14 PM
> Subject: Understanding ASHIFT SSD and adding a mirrored vdev
> 
> 
>> Hi:
>> 
>> I have read so many threads about ASHIFT on SSD my head is spinning.  
>> This is my current partition created with a 10-stable installer. 2x3TB 
>> drives in mirror and ashift=12 looks correct. I added the SSD
>> which defaulted to ashift=9 and  this is where my question is.
>> 
>> Is alignment on SSD important as from what I read we never really know
>> the flash layout?  I hope there is a simply answer to this ;-)
> 
> SSD's are generally 4K devices yes, but they also almost always lie
> about their 4k ness, instead reporting 512byte sectors for max
> compatibility.
> 
> To work around devices which lie FreeBSD has device "quirks", we've
> included 4k quirks for quite a large number of SSD's but the list is
> ever growning so its not garanteed that your SSD will have a quirk
> to correct its lies, if in fact it is lieing.
> 
>> Secondly, I want to add another vdev 2x mirrored 3tb drives and it 
>> seems that ashift would be vdev specific so I would need to gnop the 
>> new
>> drives before add the new vdev?
> 
> I've just MFC'ed r264850 to 10-stable, seems I forgot to tag with MFC 
> so
> didn't get a reminder, so if you update to the latest source you'll 
> have
> a new sysctl: vfs.zfs.min_auto_ashift
> 
> This can be used to force the ashift to be artificually increased, 
> which
> is useful for forward compatibility.
> 
>> <gnop magic to create partition and set ashift=12>
> 
> Instead use: sysctl vfs.zfs.min_auto_ashift=12
> 
>> then
>> 
>> zfs add zroot mirror ada3 ada4
> 
> Also what is your SSD can you provide the details from:
> camcontrol identify ada2
> 
> This will allow us to create a new quirk if needed.
> 
>    Regards
>    Steve


Steve thanks for you quick reply, and I'm updating now.  Here are two 
different SSD,
they both claim to 512 bytes logically and physically.


root at charon:/usr/home/mikej # camcontrol identify ada1
pass2: <Samsung SSD 840 PRO Series DXM05B0Q> ATA-9 SATA 3.x device
pass2: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)

protocol              ATA/ATAPI-9 SATA 3.x
device model          Samsung SSD 840 PRO Series
firmware revision     DXM05B0Q
serial number         S1ANNSAD905507F
WWN                   50025385a00fff63
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 512, offset 0
LBA supported         250069680 sectors
LBA48 supported       250069680 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA6
media RPM             non-rotating

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes	yes
write cache                    yes	yes
flush cache                    yes	yes
overlap                        no
Tagged Command Queuing (TCQ)   no	no
Native Command Queuing (NCQ)   yes		32 tags
SMART                          yes	yes
microcode download             yes	yes
security                       yes	no
power management               yes	yes
advanced power management      no	no
automatic acoustic management  no	no
media status notification      no	no
power-up in Standby            no	no
write-read-verify              yes	no	0/0x0
unload                         no	no
free-fall                      no	no
Data Set Management (DSM/TRIM) yes
DSM - max 512byte blocks       yes              8
DSM - deterministic read       yes              zeroed
Host Protected Area (HPA)      yes      no      250069680/250069680
HPA - Security                 no
root at charon:/usr/home/mikej #


root at firewall:/home/mikej # camcontrol identify ada2
pass2: <CT128V4SSD2 S5FAMM25> ATA-8 SATA 2.x device
pass2: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)

protocol              ATA/ATAPI-8 SATA 2.x
device model          CT128V4SSD2
firmware revision     S5FAMM25
serial number         539C0738093100005042
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 512, offset 0
LBA supported         250069680 sectors
LBA48 supported       250069680 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA5
media RPM             non-rotating

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes	yes
write cache                    yes	yes
flush cache                    yes	yes
overlap                        no
Tagged Command Queuing (TCQ)   no	no
Native Command Queuing (NCQ)   yes		32 tags
NCQ Queue Management           no
NCQ Streaming                  no
Receive & Send FPDMA Queued    no
SMART                          yes	yes
microcode download             yes	yes
security                       yes	no
power management               yes	yes
advanced power management      yes	no	0/0x00
automatic acoustic management  no	no
media status notification      no	no
power-up in Standby            no	no
write-read-verify              no	no
unload                         yes	yes
general purpose logging        yes	yes
free-fall                      no	no
Data Set Management (DSM/TRIM) yes
DSM - max 512byte blocks       yes              not specified
DSM - deterministic read       no
Host Protected Area (HPA)      yes      no      250069680/250069680
HPA - Security                 no
root at firewall:/home/mikej #

--mikej


More information about the freebsd-fs mailing list