From owner-freebsd-current@FreeBSD.ORG Wed Oct 9 02:30:31 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6E12EDAF for ; Wed, 9 Oct 2013 02:30:31 +0000 (UTC) (envelope-from outbackdingo@gmail.com) Received: from mail-ob0-x22f.google.com (mail-ob0-x22f.google.com [IPv6:2607:f8b0:4003:c01::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 34C802275 for ; Wed, 9 Oct 2013 02:30:31 +0000 (UTC) Received: by mail-ob0-f175.google.com with SMTP id uz6so220323obc.34 for ; Tue, 08 Oct 2013 19:30:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7kiPymjiyjnWo9DHCFksbtWNtfLiXcrrbrCIta3gl/w=; b=vQmMUxbxbImSfW/UQMKiESB8x4Cr1BYCYTkGGGygvv8rNlWu9K3GjoMJCxyN1uBvuF O8DhCSUi5c/IBTropTk4dh2fEYv7TxiOK+ALRip6fNwIB8daieLk2X+B5rSyiW2QDtkG rEX7GGUFgmN3MEVI8KUT+YU9Ol74ZuGakHHtsDZKtFlljsir8MiWHQ/5M/gV7V2bS1cr MFz562SuLYpRSr02gkQe0p4dRUrNzHNchi/lyTyFh+Zi7QjMZnU8t46+C8EwuUBuuEWs zGmZjnzdLm1KzMsE8OyUcs+ZlfrqzyrVqOZAXf5j8m6sft+rjLSIktp9G8PVKp959wn0 5RSQ== MIME-Version: 1.0 X-Received: by 10.182.142.229 with SMTP id rz5mr3728235obb.12.1381285830468; Tue, 08 Oct 2013 19:30:30 -0700 (PDT) Received: by 10.76.13.228 with HTTP; Tue, 8 Oct 2013 19:30:30 -0700 (PDT) In-Reply-To: <52549191.5010400@allanjude.com> References: <52531295.7090700@allanjude.com> <52546844.2010608@freebsd.org> <52549191.5010400@allanjude.com> Date: Tue, 8 Oct 2013 22:30:30 -0400 Message-ID: Subject: Re: [CFT] Patch to bsdinstall to support root-on-ZFS and GELI From: Outback Dingo To: Allan Jude Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-current@freebsd.org 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 02:30:31 -0000 On Tue, Oct 8, 2013 at 7:13 PM, 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. > > > 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. > > > 4. What is this gnop stuff for? > yeah, we align the partitions and the blocks to ensure optimal > performance on 'advanced format' drives, there is no real downside for > older drives, and it saves you from headaches in the future. > > > 5. I think some substantial part of the MBR code will blow up if you are > > reinitalizing a previously formatted disk (the bsdlabel will be retasted > > and come back from the dead). > We try to do what we can here, including creating a fresh GPT and MBR > and blowing them away to ensure that anything left over is really dead. > We also use zpool labelclear, which doesn't check if there ever was a > ZFS label, it just blindly overwrites the spots where the label would go. > I'll add some additional napalm to ensure there are no zombie partitions. > > > -Nathan > I can now confirm with the latest patches from 1.5 hours ago applied i can now install and boot into a zfs-on-root system under XEN...... now you seriously ROCK! great work ....... and thanks dmesg Copyright (c) 1992-2013 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 10.0-ALPHA5 #1 r256169M: Wed Oct 9 01:03:43 EDT 2013 dingo@current.optimcloud.com:/usr/obj/usr/src/sys/GENERIC amd64 FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 XEN: Hypervisor version 4.3 detected. CPU: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz (2494.38-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x306a9 Family = 0x6 Model = 0x3a Stepping = 9 Features=0x1783fbff Features2=0xffb82203 AMD Features=0x28100800 AMD Features2=0x1 Standard Extended Features=0x200 real memory = 2147483648 (2048 MB) avail memory = 2048917504 (1954 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: ioapic0: Changing APIC ID to 1 MADT: Forcing active-low polarity and level trigger for SCI ioapic0 irqs 0-47 on motherboard random: initialized kbd1 at kbdmux0 xen_et0: on motherboard Event timer "XENTIMER" frequency 1000000000 Hz quality 950 Timecounter "XENTIMER" frequency 1000000000 Hz quality 950 acpi0: on motherboard acpi0: Power Button (fixed) acpi0: Sleep Button (fixed) acpi0: reservation of 0, a0000 (3) failed cpu0: on acpi0 attimer0: port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 atrtc0: port 0x70-0x71 irq 8 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <32-bit timer at 3.579545MHz> port 0xb008-0xb00b on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 isab0: at device 1.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xc260-0xc26f at device 1.1 on pci0 ata0: at channel 0 on atapci0 ata1: at channel 1 on atapci0 uhci0: port 0xc240-0xc25f irq 23 at device 1.2 on pci0 usbus0: controller did not stop usbus0 on uhci0 pci0: at device 1.3 (no driver attached) vgapci0: mem 0xf0000000-0xf1ffffff,0xf3020000-0xf3020fff at device 2.0 on pci0 xenpci0: port 0xc000-0xc0ff mem 0xf2000000-0xf2ffffff irq 28 at device 3.0 on pci0 xenstore0: on xenpci0 pcm0: port 0xc100-0xc1ff irq 36 at device 5.0 on pci0 pcm0: atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model IntelliMouse Explorer, device ID 4 fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: does not respond device_attach: fdc0 attach returned 6 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 fdc0: No FDOUT register! ppc0: cannot reserve I/O port range ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is present; to enable, add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf. ZFS filesystem version: 5 ZFS storage pool version: features support (5000) Timecounters tick every 10.000 msec usbus0: 12Mbps Full Speed USB v1.0 xenbusb_front0: on xenstore0 ugen0.1: at usbus0 uhub0: on usbus0 xn0: at device/vif/0 on xenbusb_front0 xn0: Ethernet address: 00:16:3e:56:4c:9d xenbusb_back0: on xenstore0 xctrl0: on xenstore0 xn0: backend features: feature-sg feature-gso-tcp4 xbd0: 16384MB at device/vbd/768 on xenbusb_front0 xbd0: attaching as ada0 xbd0: features: flush, write_barrier xbd0: synchronize cache commands enabled. Netvsc initializing... Timecounter "TSC-low" frequency 1247190583 Hz quality 800 Root mount waiting for: usbus0 uhub0: 2 ports with 2 removable, self powered Trying to mount root from zfs:zroot/bootenv/default []... zpool status pool: zroot state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 gptid/0986ae37-3089-11e3-9a23-00163e564c9d ONLINE 0 0 0 errors: No known data errors uname -a FreeBSD zfsroot.xxxxxxxxx.com 10.0-ALPHA5 FreeBSD 10.0-ALPHA5 #1 r256169M: Wed Oct 9 01:03:43 EDT 2013 xxxxxx@current.xxxxxxx.com:/usr/obj/usr/src/sys/GENERIC amd64 > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to " > freebsd-current-unsubscribe@freebsd.org" > > > -- > Allan Jude > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >