From owner-freebsd-current@FreeBSD.ORG Wed Oct 9 02:32:35 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 674ADED5 for ; Wed, 9 Oct 2013 02:32:35 +0000 (UTC) (envelope-from outbackdingo@gmail.com) Received: from mail-ob0-x22e.google.com (mail-ob0-x22e.google.com [IPv6:2607:f8b0:4003:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2D7342290 for ; Wed, 9 Oct 2013 02:32:35 +0000 (UTC) Received: by mail-ob0-f174.google.com with SMTP id wm4so224649obc.5 for ; Tue, 08 Oct 2013 19:32:34 -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=MjDT0AWLYX5N5Sqfl7kjVnEcnFns3zpAC2FGBuMl9x4=; b=KPVd1ffI2ro5Ev0JUk+gho8chnDkse1VQEPBInQ5NQcLvhxmf5is0kFV2mHxpcVRiV vMifsKy/CWL7PWBEnEuqJRHutIhIKKkeM1PWO5I3mHLZ/3S76VZzy/vCadiTM6gi1ngi zOE1onjRJW4glhqs4rb40IoBMUW6C9+ybWHa/qVm52O+6e34sMEzPROWeXcIa8Kc+xzZ I4DmDXMbU6uunkIzTUl2nVYugGlqbvRWEv36rXPdQzDSak4bTrf1BJeDVYp5EdQoQhOA YXXPmk0+z/hwn49ioW0i3x0eKAe2sCOd63xAE7v+URECyChL7k6jehkJP4ZRAZkPsZPX aEig== MIME-Version: 1.0 X-Received: by 10.60.62.101 with SMTP id x5mr3786550oer.24.1381285954136; Tue, 08 Oct 2013 19:32:34 -0700 (PDT) Received: by 10.76.13.228 with HTTP; Tue, 8 Oct 2013 19:32:34 -0700 (PDT) In-Reply-To: References: <52531295.7090700@allanjude.com> <52546844.2010608@freebsd.org> <52549191.5010400@allanjude.com> Date: Tue, 8 Oct 2013 22:32:34 -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:32:35 -0000 On Tue, Oct 8, 2013 at 10:30 PM, Outback Dingo wrote: > > > > 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 > I did just notice this....... permissions on sys drwxrwxr-x 57 1000 1000 58 Feb 22 2008 sys and super sweet layout df -h Filesystem Size Used Avail Capacity Mounted on zroot/bootenv/default 12G 778M 12G 6% / devfs 1.0K 1.0K 0B 100% /dev zroot/tmp 12G 176K 12G 0% /tmp zroot/usr/home 12G 184K 12G 0% /usr/home zroot/usr/local 12G 144K 12G 0% /usr/local zroot/usr/obj 12G 144K 12G 0% /usr/obj zroot/usr/ports 12G 811M 12G 6% /usr/ports zroot/usr/ports/distfiles 12G 144K 12G 0% /usr/ports/distfiles zroot/usr/ports/packages 12G 144K 12G 0% /usr/ports/packages zroot/usr/src 12G 547M 12G 4% /usr/src zroot/var 12G 456K 12G 0% /var zroot/var/crash 12G 148K 12G 0% /var/crash zroot/var/db 12G 240K 12G 0% /var/db zroot/var/db/pkg 12G 144K 12G 0% /var/db/pkg zroot/var/empty 12G 144K 12G 0% /var/empty zroot/var/log 12G 196K 12G 0% /var/log zroot/var/mail 12G 144K 12G 0% /var/mail zroot/var/run 12G 236K 12G 0% /var/run zroot/var/tmp 12G 152K 12G 0% /var/tmp > > > > > >> > _______________________________________________ >> > 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 >> " >> > >