From owner-freebsd-stable@FreeBSD.ORG Wed Dec 18 13:53:35 2013 Return-Path: Delivered-To: stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 266242D8; Wed, 18 Dec 2013 13:53:35 +0000 (UTC) Received: from mail.egr.msu.edu (dauterive.egr.msu.edu [35.9.37.168]) by mx1.freebsd.org (Postfix) with ESMTP id C9D6C10CC; Wed, 18 Dec 2013 13:53:34 +0000 (UTC) Received: from dauterive (localhost [127.0.0.1]) by mail.egr.msu.edu (Postfix) with ESMTP id 375133C8FB; Wed, 18 Dec 2013 08:53:27 -0500 (EST) X-Virus-Scanned: amavisd-new at egr.msu.edu Received: from mail.egr.msu.edu ([127.0.0.1]) by dauterive (dauterive.egr.msu.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id symjxwR3_W3X; Wed, 18 Dec 2013 08:53:27 -0500 (EST) Received: from daemon.localdomain (daemon.egr.msu.edu [35.9.44.65]) by mail.egr.msu.edu (Postfix) with ESMTP id F078D3C8F5; Wed, 18 Dec 2013 08:53:26 -0500 (EST) Received: by daemon.localdomain (Postfix, from userid 21281) id D478635963; Wed, 18 Dec 2013 08:53:26 -0500 (EST) Date: Wed, 18 Dec 2013 08:53:26 -0500 From: Adam McDougall To: "Teske, Devin" Subject: Re: bsdinstall, zfs booting, gpt partition order suitable for volume expansion Message-ID: <20131218135326.GM1728@egr.msu.edu> References: <20131210175323.GB1728@egr.msu.edu> <93C924DB-E760-4830-B5E2-3A20160AD322@fisglobal.com> <2D40298B-39FA-4BA9-9AC2-6006AA0E0C9C@fisglobal.com> <73E28A82-E9FE-4B25-8CE6-8B0543183E7F@fisglobal.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <73E28A82-E9FE-4B25-8CE6-8B0543183E7F@fisglobal.com> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: "stable@FreeBSD.org" , Devin Teske X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.17 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, 18 Dec 2013 13:53:35 -0000 On Mon, Dec 16, 2013 at 08:18:14PM +0000, Teske, Devin wrote: On Dec 14, 2013, at 7:44 PM, Teske, Devin wrote: > > On Dec 10, 2013, at 11:00 AM, Devin Teske wrote: > >> >> On Dec 10, 2013, at 9:53 AM, Adam McDougall wrote: >> >>> I was wondering if either the default gpt partition order could become >>> p1=boot, p2=swap, p3=zpool, or if the installer could be enhanced at >>> some point to allow the user to select the order. It seems like it would >>> be easier to expand the size of the raw device (VM, iscsi, etc) and expand >>> the zpool if it is the last partition. I am not in a hurry to get this >>> solved, but if a change to the default order is worthwhile, it seems like >>> before 10.0 would be a good time to set precedent. I'm trying to think ahead >>> where people will be installing 10 to VMs or expandable volumes so they can >>> take advantage of expansion with less hassle. I pinged Allen Jude on this >>> briefly, I think he said it used to be that way but it was changed to >>> accomodate MBR partitioning (I think, apologies for not remembering details). >> >> Excellent idea. Let me put that into a patch. I'll let you know when I have >> something that tests clean. > > GPT proved trivial. > MBR on the other hand... that proved challenging. > > While trying to best that challenge... I uncovered more than a couple nasty bugs > while iterating over every possible combination in the installer. > > That being said... I'm coming out of the "tunnel" since you sent this e-mail and > will soon have something to commit that implements this suggestion while at > the same time, plugging a few edge-cases. Alrighty-then... time to share... Here's the commit that does what you want... http://svnweb.freebsd.org/base?view=revision&revision=259476 But just keep in-mind that the whole ball of wax that I "tested to death" is actually a combination of the following (in order): http://svnweb.freebsd.org/base?view=revision&revision=259468 http://svnweb.freebsd.org/base?view=revision&revision=259469 http://svnweb.freebsd.org/base?view=revision&revision=259470 http://svnweb.freebsd.org/base?view=revision&revision=259472 http://svnweb.freebsd.org/base?view=revision&revision=259474 http://svnweb.freebsd.org/base?view=revision&revision=259476 http://svnweb.freebsd.org/base?view=revision&revision=259477 http://svnweb.freebsd.org/base?view=revision&revision=259478 http://svnweb.freebsd.org/base?view=revision&revision=259479 http://svnweb.freebsd.org/base?view=revision&revision=259480 http://svnweb.freebsd.org/base?view=revision&revision=259481 Needless to say, I'm going to take that break now. -- Devin Thanks. I waited around for a daily snapshot builder to make an ISO containing these changes, and last night this one was built: https://pub.allbsd.org/FreeBSD-snapshots/amd64-amd64/11.0-HEAD-r259514-JPSNAP/ It seems to work for 1 or 2 disks, but if I pick 3 or 4 disks in a stripe, mirror or raidz I get: Error: zpool cannot open 'ada0p3.nopzpool': no such GEOM provider must be a full path or shorthand device name followed by: Error: zfs cannot open 'zroot': dataset does not exist I did my testing in virtualbox with 4 5g disk images. Whether or not the installer continues, it does seem to partition the disks as discussed. When I hit F3 I see: DEBUG: zfs_create_boot: Creating root pool... DEBUG: zfs_create_boot: zpool create -o altroot=/mnt -m none -f "zroot" ada0p3.nop ada1p3.nopzpool create ada2p3.nop "" DEBUG: zfs_create_boot: retval=1 cannot open 'ada1p3.nopzpool': no such GEOM provider