Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Jan 2019 23:14:13 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        Ben Woods <woodsb02@gmail.com>, Colin Percival <cperciva@tarsnap.com>
Cc:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>, freebsd-cloud@freebsd.org
Subject:   Re: Any plans for EC2 AMIs with RootOnZFS?
Message-ID:  <a88df726-f423-4344-56bb-38a7b4947c74@quip.cz>
In-Reply-To: <CAOc73CBQBOYT6XTP35HuiP8VxXyoqXSxNkEt-TZ=Y-0u1aBT8A@mail.gmail.com>
References:  <CAOc73CBQ%2B282amu-d%2BcxUehLBuhPKSrWTnft1_eSvY5FNKynwg@mail.gmail.com> <01000167dd7b16cd-58ee733f-c662-42d5-9c75-2301fbc8377a-000000@email.amazonses.com> <01000167f27b4c13-41c15731-ae4c-4658-820d-80c4d4fbb01c-000000@email.amazonses.com> <CAOc73CBQBOYT6XTP35HuiP8VxXyoqXSxNkEt-TZ=Y-0u1aBT8A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ben Woods wrote on 2019/01/05 13:39:
> On Fri, 28 Dec 2018 at 12:43, Colin Percival<cperciva@tarsnap.com>  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a88df726-f423-4344-56bb-38a7b4947c74>