From owner-freebsd-current@FreeBSD.ORG Wed Oct 9 07:19:56 2013 Return-Path: Delivered-To: freebsd-current@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 ESMTP id 41753EC7 for ; Wed, 9 Oct 2013 07:19:56 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtpauth4.wiscmail.wisc.edu (wmauth4.doit.wisc.edu [144.92.197.145]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 11A222078 for ; Wed, 9 Oct 2013 07:19:55 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from avs-daemon.smtpauth4.wiscmail.wisc.edu by smtpauth4.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) id <0MUD00A00ZLW6300@smtpauth4.wiscmail.wisc.edu> for freebsd-current@freebsd.org; Wed, 09 Oct 2013 01:19:48 -0500 (CDT) X-Spam-PmxInfo: Server=avs-4, Version=6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.10.9.61215, SenderIP=0.0.0.0 X-Spam-Report: AuthenticatedSender=yes, SenderIP=0.0.0.0 Received: from wanderer.tachypleus.net (unknown [140.105.20.242]) by smtpauth4.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) with ESMTPSA id <0MUE004CA1KYSD10@smtpauth4.wiscmail.wisc.edu> for freebsd-current@freebsd.org; Wed, 09 Oct 2013 01:19:48 -0500 (CDT) Message-id: <5254F582.1040406@freebsd.org> Date: Wed, 09 Oct 2013 08:19:46 +0200 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 To: freebsd-current@freebsd.org Subject: Re: [CFT] Patch to bsdinstall to support root-on-ZFS and GELI References: <52531295.7090700@allanjude.com> <52546844.2010608@freebsd.org> <52549191.5010400@allanjude.com> In-reply-to: <52549191.5010400@allanjude.com> X-Enigmail-Version: 1.5.2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Wed, 09 Oct 2013 07:19:56 -0000 On 10/09/13 01:13, Allan Jude wrote: > On 2013-10-08 16:17, Nathan Whitehorn wrote: >> On 10/07/13 21:59, Allan Jude wrote: >>> Devin Teske and I have been working on a big patch to bsdinstall to >>> implement installing on a ZFS pool. It supports both GPT and MBR, the 4k >>> sector gnop trick, and optional GELI encryption. We would like to commit >>> this in time for 10.0-BETA1 so it needs some testing to work out any >>> obvious bugs before we send it off to re@ to get it committed. >>> >>> It includes a single configuration menu that allows you to select all of >>> the required details, including which drives to use (gets details from >>> camcontrol, also includes an inspection utility that presents the >>> detailed output of camcontrol inquiry/identify, and gpart show), what >>> ZFS RAID level to use (taking in to consideration the selected number of >>> drives), GPT/mbr, 4k YES/no, GELI yes/NO, pool name, etc. >>> >>> >>> Additional, it includes some other changes to bsdinstall: >>> 1. Change the default to the 'non-standard keyboard mapping' prompt to no >>> 2. Replace the 3 separate dialogs to configure an ipv4 address with just 1 >>> 3. Remove the dialog asking if you wish to enable crash dumps, this >>> feature has been combined into the regular 'services to enable' dialog >>> and enabled by default >>> >>> >>> You can browse the patches here: >>> http://druidbsd.cvs.sf.net/viewvc/druidbsd/bsdinstall_zfs/ >>> >>> I've built a bootonly.iso (10.0-ALPHA4) to make testing easier, >>> available compressed (48 MB) or uncompressed (211 MB): >>> >>> http://www.allanjude.com/bsd/zfsbootonly_2013-10-06.iso.xz >>> >>> http://www.allanjude.com/bsd/zfsbootonly_2013-10-06.iso >>> >>> >>> We look forward to your feedback >>> >> Thanks for doing this! I had a few comments: >> 1. ZFS is not bootable on all architectures. Could you adjust that menu >> item to only display for i386, amd64, and (I think?) sparc64. Use uname >> -m, not -p, for this. > I had not considered that, I'll make that change > >> 1a. The script is broken on sparc64 in any case, which uses VTOC8 >> instead of GPT. > I'll disable sparc64 as well > >> 2. Why are you using camcontrol? That is guaranteed not to work on >> non-CAM systems. You should use the GEOM ident string if you need an ID. > The GEOM ident string doesn't do enough to help the user identify which > drive is which. > More data is not exposed anywhere that I could find > > What we really need, is dev.ada.0.desc% like we have for network > interfaces and a slew of other devices. GEOM data is great, but it is > not exposed in a shell friendly way any place that I could find, other > than the sysctl with DOT and XML data. This is one of the reasons the partition editor is written in C. There are a few other odd corner-cases where C is much more powerful than the command-line for the GEOM operations that partedit needs to do. I'm not sure how to usefully get it just from the shell. You can see how to do it in C in the boot_disk() routine of partedit/auto_part.c. >> 3. Any plans to integrate this into the regular partition editor? ZFS >> support is important enough that I will definitely not get in the way, >> even as a bolt-on, but it would be a shame for it to stay that way. The >> editor is also designed for ZFS to be added. > I am a sysadmin, not a programmer. I can't write C. Most people > deploying servers can't write C. I agree with Devin Teske, if everything > was in shell it would be a lot more usable for non-developers, who > probably make up the majority of people who deploy FreeBSD. There are some cases the other way too. Devin is probably the most shell-proficient FreeBSD committer. I certainly can't write shell scripts at that level, which means that for me bsdconfig, for example, is effectively read-only (and quite hard to read as well). I suspect the same is true for many other developers. Without any prejudice about the relative merits of the languages, this can cause some significant internal maintenance issues. Something similar happened to sysinstall (which was in C): due to its complexity and high amounts of magic, it had become read-only for basically all committers and as a result fell years and years behind the rest of the project. Hopefully this is paranoia, but I can easily see complex shell scripts engendering the same problem. In any case, this particular comment was just related to the benefits of having one tool, and one UI, rather than duplicating partitioning logic in multiple places. None of this is actually complicated, so the duplication isn't that bad, but doing everything in one place long-term is almost certainly better for the user, no matter what programming language that tool is written in. -Nathan