From owner-freebsd-current@freebsd.org Tue Dec 26 16:50:59 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D78CEA19F1 for ; Tue, 26 Dec 2017 16:50:59 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A1377D8BB for ; Tue, 26 Dec 2017 16:50:59 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 1383C13F84 for ; Tue, 26 Dec 2017 16:44:30 +0000 (UTC) Subject: Re: ZFS: alignment/boundary for partition type freebsd-zfs To: freebsd-current@freebsd.org References: <20171226172521.611a89b0@thor.intern.walstatt.dynvpn.de> From: Allan Jude Message-ID: Date: Tue, 26 Dec 2017 11:44:29 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171226172521.611a89b0@thor.intern.walstatt.dynvpn.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Dec 2017 16:50:59 -0000 On 2017-12-26 11:24, O. Hartmann wrote: > Running recent CURRENT on most of our lab's boxes, I was in need to replace and restore a > ZFS RAIDZ pool. Doing so, I was in need to partition the disks I was about to replace. > Well, the drives in question are 4k block size drives with 512b emulation - as most of > them today. I've created the only and sole partiton on each 4 TB drive via the command > sequence > > gpart create -s GPT adaX > gpart add -t freebsd-zfs -a 4k -l nameXX adaX > > After doing this on all drives I was about to replace, something drove me to check on > the net and I found a lot of websites giving "advices", how to prepare large, modern > drives for ZFS. I think the GNOP trick is not necessary any more, but many blogs > recommend to perform > > gpart add -t freebsd-zfs -b 1m -a 4k -l nameXX adaX > > to put the partition boundary at the 1 Megabytes boundary. I didn't do that. My > partitions all start now at block 40. > > My question is: will this have severe performance consequences or is that negligible? > > Since most of those websites I found via "zfs freebsd alignement" are from years ago, I'm > a bit confused now an consideration performing all this days-taking resilvering process > let me loose some more hair as the usual "fallout" ... > > Thanks in advance, > > Oliver > The 1mb alignment is not required. It is just what I do to leave room for the other partition types before the ZFS partition. However, the replacement for the GNOP hack, is separate. In addition to aligning the partitions to 4k, you have to tell ZFS that the drive is 4k: sysctl vfs.zfs.min_auto_ashift=12 (2^12 = 4096) Before you create the pool, or add additional vdevs. -- Allan Jude