From owner-freebsd-current@freebsd.org Tue Dec 26 17:31:47 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 DBB51EA4377 for ; Tue, 26 Dec 2017 17:31:47 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 573F37F89B; Tue, 26 Dec 2017 17:31:46 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([78.55.225.232]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lb90f-1fEGR93i0H-00kdvT; Tue, 26 Dec 2017 18:31:39 +0100 Date: Tue, 26 Dec 2017 18:31:05 +0100 From: "O. Hartmann" To: Alan Somers Cc: Allan Jude , FreeBSD CURRENT Subject: Re: ZFS: alignment/boundary for partition type freebsd-zfs Message-ID: <20171226183132.2a6c6c2f@thor.intern.walstatt.dynvpn.de> In-Reply-To: References: <20171226172521.611a89b0@thor.intern.walstatt.dynvpn.de> <20171226180511.4d7d422e@thor.intern.walstatt.dynvpn.de> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/rsOg3mkGZcS/8+G946gbr2v"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:00++uoAB90BBKi98wFd9tc0VCOBVKdWFV2zlZ5Im5OB1MNj4PK2 KyUv9H9uN50Q7uCG7dz75oBLWKslU6vonEy3ZO6kE1TppndXXNtN7y04AWP29PfRSwpR3ur 7UERNAK3UgjSxjRWwQYqhMY2M78nzn4hfr3shyk64lUpdJW/eIpYz6qdKNJKxEM9eFRZgK+ oFvR0GRWhQai1CPSfUaFw== X-UI-Out-Filterresults: notjunk:1;V01:K0:ViJ1WjoWJL0=:4iuAgJigD4/RBFJZwEieSJ LwhKpJtfMczVEIk00xe+BukFFYjs4EWj0+DCN5+dLGw4Wl78R69IuLp5bKcUzNKD/otEdSg1q 59aVSRpVht0LF/W+gC5Gqlt7O3NGLIustyQ6nwFUYyMQtRu2te3bCrCoaE3iWV9yU0qNxwybF CchRXvi7YboB6yS/51thzDHEqFSRVdQwa70qFkOf94iboZ/sVk6P3z1EgwxaMgizJa/NmRFWz zIFJp5orSPDKFn+Bfb2DT6AZwQFdl6VposKFMMY9hn6yR9RDhg0cAaYHnzHQDnbSoou05G0sc bNGiNJFVltmxTKYVq/749T94yH7dIPZSgWPx6nXDxCNuFSs7/+995ZQs8Vj3mAia5mIs00L5t Q5oyeJf9LlOqj70WtubnSP1zz93hMF/TXv4aWZtgVFe1VdSlcQsNYMP5IK9kxQb3GKkICfDN0 L1hV2VTPUiXLfzw5tk4MvPdG48YtcNE3invvG+O/FxnbqzaoW6mGK0+R0dTyZIzxYELY3ntV6 AI26VpJFLiJ87SNXZ4tvQEeG4SA9J+3afSzF8Si1U8kibpU42onTaFbVDkWyrgdZzNNvAN8JS 3jBOnKYbI5K8ggP+5ODc+FU/NJSdb929Xywvi5i5Fxi5WhUmtpquu3eC7WtL2TulmS6qPGkUy MgYRNYhFgDeHon3gy7R3FoIb/8xHHUUQz7iVREOzxfFJHYVYLfWVIK9DGe/6ftIe5q4CrIRjc WSZyqwMGdDwKPLoO2MAiozIoVGP1+2ZtcGSYBSAs5XVlwZRYdzFIWpG3CaItkuCi3Il8UPWI+ ETSlq/N5BTIS2KIL1L5mVG+yMSG4g== X-Mailman-Approved-At: Tue, 26 Dec 2017 19:32:29 +0000 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 17:31:48 -0000 --Sig_/rsOg3mkGZcS/8+G946gbr2v Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Tue, 26 Dec 2017 10:13:09 -0700 Alan Somers schrieb: > On Tue, Dec 26, 2017 at 10:04 AM, O. Hartmann > wrote: >=20 > > Am Tue, 26 Dec 2017 11:44:29 -0500 > > Allan Jude schrieb: > > =20 > > > On 2017-12-26 11:24, O. Hartmann wrote: =20 > > > > Running recent CURRENT on most of our lab's boxes, I was in need to= =20 > > replace and =20 > > > > restore a ZFS RAIDZ pool. Doing so, I was in need to partition the = =20 > > disks I was about =20 > > > > to replace. Well, the drives in question are 4k block size drives w= ith =20 > > 512b emulation =20 > > > > - as most of them today. I've created the only and sole partiton on= =20 > > each 4 TB drive =20 > > > > 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 dr= ove =20 > > me to check on =20 > > > > the net and I found a lot of websites giving "advices", how to prep= are =20 > > large, modern =20 > > > > drives for ZFS. I think the GNOP trick is not necessary any more, b= ut =20 > > many blogs =20 > > > > 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 =20 > > that. My =20 > > > > partitions all start now at block 40. > > > > > > > > My question is: will this have severe performance consequences or i= s =20 > > that negligible? =20 > > > > > > > > Since most of those websites I found via "zfs freebsd alignement" a= re =20 > > from years ago, =20 > > > > I'm a bit confused now an consideration performing all this =20 > > days-taking resilvering =20 > > > > process let me loose some more hair as the usual "fallout" ... > > > > > > > > Thanks in advance, > > > > > > > > Oliver > > > > =20 > > > > > > 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=3D12 > > > > > > (2^12 =3D 4096) > > > > > > Before you create the pool, or add additional vdevs. > > > =20 > > > > I didn't do the sysctl vfs.zfs.min_auto_ashift=3D12 :-(( when I created= the > > vdev. What is > > the consequence for that for the pool? I lived under the impression that > > this is necessary > > for "native 4k" drives. > > > > How can I check what ashift is in effect for a specific vdev? > > =20 >=20 > It's only necessary if your drive stupidly fails to report its physical > sector size correctly, and no other FreeBSD developer has already written= a > quirk for that drive. Do "zdb -l /dev/adaXXXpY" for any one of the > partitions in the ZFS raid group in question. It should print either > "ashift: 12" or "ashift: 9". >=20 > -Alan > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" I checked as suggested and all partitions report ashift: 12. So I guess I'm save and sound and do not need to rebuild the pools ...?=20 --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/rsOg3mkGZcS/8+G946gbr2v Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWkKHdAAKCRDS528fyFhY lPCeAgCM+lZW4RBGwzSNFTLLBWTATh/jI9zeMG49nlelrQjPZDaq0GUmZcUjufVN 2bmyLvYHxjk+MXfHtDi1l2s2lO2SAf9j/8T2zk0KR6iqWOLS7vOLux3JP5z0qrCU wMA0sZ4/JeHw1QU6XLHQOWbROHgF0jBUm/ktCzT/jsMcvL1p5icz =0rVe -----END PGP SIGNATURE----- --Sig_/rsOg3mkGZcS/8+G946gbr2v--