From owner-freebsd-cloud@freebsd.org Sat Jan 5 22:14:28 2019 Return-Path: Delivered-To: freebsd-cloud@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4248D1424E71; Sat, 5 Jan 2019 22:14:28 +0000 (UTC) (envelope-from SRS0=/O5A=PN=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (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 A54F06F84A; Sat, 5 Jan 2019 22:14:27 +0000 (UTC) (envelope-from SRS0=/O5A=PN=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 2553528417; Sat, 5 Jan 2019 23:14:16 +0100 (CET) Received: from illbsd.quip.test (ip-86-49-16-209.net.upcbroadband.cz [86.49.16.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 4BDAD28416; Sat, 5 Jan 2019 23:14:14 +0100 (CET) Subject: Re: Any plans for EC2 AMIs with RootOnZFS? To: Ben Woods , Colin Percival Cc: "freebsd-fs@freebsd.org" , freebsd-cloud@freebsd.org References: <01000167dd7b16cd-58ee733f-c662-42d5-9c75-2301fbc8377a-000000@email.amazonses.com> <01000167f27b4c13-41c15731-ae4c-4658-820d-80c4d4fbb01c-000000@email.amazonses.com> From: Miroslav Lachman <000.fbsd@quip.cz> Message-ID: Date: Sat, 5 Jan 2019 23:14:13 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: A54F06F84A X-Spamd-Bar: +++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [5.56 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[cached: elsa.codelab.cz]; FORGED_SENDER(0.30)[000.fbsd@quip.cz,SRS0=/O5A=PN=quip.cz=000.fbsd@elsa.codelab.cz]; FREEMAIL_TO(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[209.16.49.86.zen.spamhaus.org : 127.0.0.11]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:42000, ipnet:94.124.104.0/21, country:CZ]; SUBJECT_ENDS_QUESTION(1.00)[]; FROM_NEQ_ENVFROM(0.00)[000.fbsd@quip.cz,SRS0=/O5A=PN=quip.cz=000.fbsd@elsa.codelab.cz]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.95)[0.947,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[quip.cz]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.97)[0.974,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.997,0]; RCVD_IN_DNSWL_NONE(0.00)[4.105.124.94.list.dnswl.org : 127.0.10.0]; IP_SCORE(0.45)[ip: (1.18), ipnet: 94.124.104.0/21(0.59), asn: 42000(0.47), country: CZ(0.04)]; R_SPF_NA(0.00)[] X-BeenThere: freebsd-cloud@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "FreeBSD on cloud platforms \(EC2, GCE, Azure, etc.\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2019 22:14:28 -0000 Ben Woods wrote on 2019/01/05 13:39: > On Fri, 28 Dec 2018 at 12:43, Colin Percival wrote: > >> I've created an experimental FreeBSD 12.0 ZFS AMI in the us-east-1 region: >> ami-0786f5b55d5aa573f >> >> Since I'm basically a ZFS newbie (I run it on my laptop, but only with the >> default setup from the installer, and I've never used any of the fancy ZFS >> features) I don't know if I've set everything up properly. So far I have >> one piece of feedback, which is that I should have marked canmount=off for >> zroot. >> > Hi Colin, > > Thanks a lot for doing this - much appreciated. > > I have just given it a try, and have the following feedback for you: > > 1. ZFS DATASETS AND PROPERTIES SHOULD MATCH INSTALLER DEFAULT > To avoid any confusion or unexpected behaviour, I believe the list of ZFS > datasets and their properties should exactly match the bsdinstall defaults > (especially for releases). > zpool create: > https://svnweb.freebsd.org/base/head/usr.sbin/bsdinstall/scripts/zfsboot?revision=342283&view=markup#l1308 > zfs datasets and properties: > https://svnweb.freebsd.org/base/head/usr.sbin/bsdinstall/scripts/zfsboot?revision=342283&view=markup#l141 > > Looking at how you created the zpool and zfs datasets (using the "zpool > history zroot" command), the following changes would achieve this outcome: > --- zfs-commands.old > +++ zfs-commands.new > @@ -1,19 +1,15 @@ > -zpool create -o altroot=/mnt zroot ada0p2 > -zfs set compress=on zroot > +zpool create -o altroot=/mnt -O compress=lz4 -O atime=off -m none -f zroot > ada0p2 > zfs create -o mountpoint=none zroot/ROOT > zfs create -o mountpoint=/ -o canmount=noauto zroot/ROOT/default > zfs create -o mountpoint=/tmp -o exec=on -o setuid=off zroot/tmp > -zfs create -o canmount=off -o mountpoint=/usr zroot/usr > +zfs create -o mountpoint=/usr -o canmount=off zroot/usr > zfs create zroot/usr/home > -zfs create -o exec=off -o setuid=off zroot/usr/src > -zfs create zroot/usr/obj > -zfs create -o mountpoint=/usr/ports -o setuid=off zroot/usr/ports > -zfs create -o exec=off -o setuid=off zroot/usr/ports/distfiles > -zfs create -o exec=off -o setuid=off zroot/usr/ports/packages > -zfs create -o canmount=off -o mountpoint=/var zroot/var > +zfs create -o setuid=off zroot/usr/ports > +zfs create zroot/usr/src > +zfs create -o mountpoint=/var -o canmount=off zroot/var > zfs create -o exec=off -o setuid=off zroot/var/audit > zfs create -o exec=off -o setuid=off zroot/var/crash > zfs create -o exec=off -o setuid=off zroot/var/log > -zfs create -o atime=on -o exec=off -o setuid=off zroot/var/mail > -zfs create -o exec=on -o setuid=off zroot/var/tmp > +zfs create -o atime=on zroot/var/mail > +zfs create -o setuid=off zroot/var/tmp > zpool set bootfs=zroot/ROOT/default zroot I think the opposite - bsdinstall shoul be fixed to use exec=off and setuid=off. Just my $0.02 Miroslav Lachman