From owner-freebsd-fs@FreeBSD.ORG Thu May 15 13:35:00 2014 Return-Path: Delivered-To: freebsd-fs@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 D3779EDB for ; Thu, 15 May 2014 13:35:00 +0000 (UTC) Received: from mx2.paymentallianceintl.com (mx2.paymentallianceintl.com [216.26.158.171]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx2.paymentallianceintl.com", Issuer "Go Daddy Secure Certification Authority" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 166D528D4 for ; Thu, 15 May 2014 13:34:59 +0000 (UTC) Received: from firewall.mikej.com (162-238-140-44.lightspeed.lsvlky.sbcglobal.net [162.238.140.44]) by mx2.paymentallianceintl.com (8.14.5/8.13.8) with ESMTP id s4FDYpTX076361 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 15 May 2014 09:34:51 -0400 (EDT) (envelope-from mikej@mikej.com) Received: from mail.mikej.com (firewall [192.168.6.63]) by firewall.mikej.com (8.14.8/8.14.7) with ESMTP id s4FDYUOQ023409; Thu, 15 May 2014 09:34:50 -0400 (EDT) (envelope-from mikej@mikej.com) X-Authentication-Warning: firewall.mikej.com: Host firewall [192.168.6.63] claimed to be mail.mikej.com MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 15 May 2014 09:34:30 -0400 From: Michael Jung To: Steven Hartland Subject: Re: Understanding ASHIFT SSD and adding a mirrored vdev In-Reply-To: <426F6341FBF145FA9D98CBA06030CCA6@multiplay.co.uk> References: <5703300e3b052a3f4d14f1957ded08ce@mail.mikej.com> <426F6341FBF145FA9D98CBA06030CCA6@multiplay.co.uk> Message-ID: <914cba301cda86cd3f4b117c4350832b@mail.mikej.com> X-Sender: mikej@mikej.com User-Agent: Roundcube Webmail/1.0.0 Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 13:35:00 -0000 On , Steven Hartland wrote: > ----- Original Message ----- From: "Michael Jung" > To: > 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. > >> > > 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@charon:/usr/home/mikej # camcontrol identify ada1 pass2: 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@charon:/usr/home/mikej # root@firewall:/home/mikej # camcontrol identify ada2 pass2: 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@firewall:/home/mikej # --mikej