From owner-freebsd-stable@FreeBSD.ORG Wed Nov 19 14:32:19 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 030C9C5E for ; Wed, 19 Nov 2014 14:32:19 +0000 (UTC) Received: from mail.ijs.si (mail.ijs.si [IPv6:2001:1470:ff80::25]) (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 830DDEDD for ; Wed, 19 Nov 2014 14:32:18 +0000 (UTC) Received: from amavis-proxy-ori.ijs.si (localhost [IPv6:::1]) by mail.ijs.si (Postfix) with ESMTP id 3jjRLR21wCz1Vr for ; Wed, 19 Nov 2014 15:32:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ijs.si; h= user-agent:message-id:references:in-reply-to:organization :subject:subject:from:from:date:date:content-transfer-encoding :content-type:content-type:mime-version:received:received :received:received; s=jakla4; t=1416407531; x=1418999532; bh=I0G RhR4Pxwk0XtyeLyU7GU+fOvP29UDK10aacfKpKAc=; b=byTqEQaf2rglaePXHkl M4YA7Y4XSyW3nWF/HXZ2qJK+tyEWq97rnvh7ux5P87r/r7j1h2VCYjmuv+fbmjUG VgQ6LctMHrOtPKqDf9sbhGQGxaU7EvksBCUnsUQWI9xnwL5FKciZIcIwc5Elxx33 O/4MaHxLO1moWZZol3XTflXk= X-Virus-Scanned: amavisd-new at ijs.si Received: from mail.ijs.si ([IPv6:::1]) by amavis-proxy-ori.ijs.si (mail.ijs.si [IPv6:::1]) (amavisd-new, port 10012) with ESMTP id dlTDbXOJ7FdY for ; Wed, 19 Nov 2014 15:32:11 +0100 (CET) Received: from mildred.ijs.si (mailbox.ijs.si [IPv6:2001:1470:ff80::143:1]) by mail.ijs.si (Postfix) with ESMTP for ; Wed, 19 Nov 2014 15:32:11 +0100 (CET) Received: from neli.ijs.si (neli.ijs.si [IPv6:2001:1470:ff80:88:21c:c0ff:feb1:8c91]) by mildred.ijs.si (Postfix) with ESMTP id 3jjRLM3fQXz1Y7 for ; Wed, 19 Nov 2014 15:32:11 +0100 (CET) Received: from neli.ijs.si ([2001:1470:ff80:88:21c:c0ff:feb1:8c91]) by neli.ijs.si with HTTP (HTTP/1.1 POST); Wed, 19 Nov 2014 15:32:11 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 19 Nov 2014 15:32:11 +0100 From: Mark Martinec To: freebsd-stable@freebsd.org Subject: Re: 10.1 fresh install and 4k alignment Organization: J. Stefan Institute In-Reply-To: References: Message-ID: X-Sender: Mark.Martinec+freebsd@ijs.si User-Agent: Roundcube Webmail/1.0.3 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 14:32:19 -0000 Patrick M. Hausen wrote: > Hi, all, > > I just installed a new machine with 10.1-RELEASE using the memstick > installer > and chosing ZFS mirror root as the disk layout. > > I did check the "4k" option, watched the installer do the necessary > gnop dance > and the pool seems to be OK: > > root@seleniumhub:~ # zdb | grep ashift > ashift: 12 > > But this puzzles me a bit: > > root@seleniumhub:~ # gpart list ada0 > Mediasize: 524288 (512K) > Sectorsize: 512 > ... > Providers: > 1. Name: ada0p1 > Mediasize: 524288 (512K) > Sectorsize: 512 > ... > end: 1057 > start: 34 > ... > 3. Name: ada0p3 > Mediasize: 465747565056 (434G) > Sectorsize: 512 > ... > type: freebsd-zfs > ... > end: 976773134 > start: 67109922 > > None of the start sector numbers is a multiple of 8, neither are the > end sectors > a multiple of 8 minus 1. > > So the pool uses a 4k block size but it starts on an odd multiple of > 2k on the platter > - do I see this correctly? > > Isn't it absolutely necessary that the simulated 4k blocks are laid > out so that the first > is made from 512 byte sectors 0-7, the second from 8-15 and so on? > > Then why does the installer start the first partition at 512 byte > sector 34? While I'm at > it, this magic number is everywhere in the older documentation, e.g. > for manually > installing FreeBSD 8 with gptzfsboot - where does that 34 come from? > It's not > a power of 2 nor is it one of the historical CHS magic numbers that > would mean > a cylinder boundary or similar. Size of the GPT partition table itself? > > Is this a bug in the installer? Will I still have to layout the disks > manually if I want 4k > alignment? What's a good offset for the first partition in this case? > Anything bigger > than 34 that's a multiple of 8 - 40 or 64? > > Thanks in advance > Patrick Reported on 2014-10-10, but was apparently forgotten/ignored: "GPT partitions not 4k aligned by 10.1-RC1 installer" https://lists.freebsd.org/pipermail/freebsd-stable/2014-October/080509.html Mark