Date: Sat, 23 Feb 2019 15:14:04 +0100 From: Bernd Walter <ticso@cicely7.cicely.de> To: Stefan Parvu <sparvu@kronometrix.org> Cc: freebsd-arm@freebsd.org Subject: Re: RBPI3B+ FreeBSD 12 ZFS Message-ID: <20190223141404.GQ93368@cicely7.cicely.de> In-Reply-To: <5D976A97-9800-4A9F-A155-F3BD998AFB4C@kronometrix.org> References: <E387BB48-540D-4F5C-BD4D-2BF410108219@kronometrix.org> <a0239ad1-5b98-1149-1d14-966ed8670e79@denninger.net> <5D976A97-9800-4A9F-A155-F3BD998AFB4C@kronometrix.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 22, 2019 at 05:38:03PM +0200, Stefan Parvu wrote: > I know ZFS would need a decent amount of RAM to start with. So for such low sized > SBC systems, like Raspberry PI having ZFS for root might be no go. > > What I meant was: how complicated would be right now for FreeBSD 12 to have an > ARM64 RBPI3B+ image image which could use ZFS to boot from a SD Card. It just works. I'm also running zroot on a Pi1 (512MB version). My workflow on an amd64 machine with SD-reader as da0. This is not the perfect way of doing it, but I wanted it fast without finding out how to partition a bootable card myself first. I will change that into complete partitioning later, which also has the advantage of not writing unallocated blocks to the card, which makes the cards slower later on. Write the standard image for your board. mount /dev/da0s2a and copy the files aside (/tmp/FreeBSD-12-arm64 in the following code). umount Boot the image in a raspberry to resize. Reinsert into the amd64 system. dd if=/dev/zero of=/dev/da0s2 bs=1m count=100 gpart create -s BSD da0s2 gpart add -t freebsd-zfs -a 4k da0s2 zpool create -R /mnt -O mountpoint=none -O atime=off -O compression=lz4 zroot /dev/da0s2a zfs create -o canmount=off -o mountpoint=none zroot/ROOT zfs create -o mountpoint=/ zroot/ROOT/default zfs create zroot/ROOT/default/usr zfs create zroot/ROOT/default/usr/obj zfs create zroot/ROOT/default/var zfs create zroot/ROOT/default/var/log zfs create -o mountpoint=/home zroot/home zpool set bootfs=zroot/ROOT/default zroot cd /tmp/FreeBSD-12-arm64 find -d . | cpio -pdvm /mnt echo 'opensolaris_load="YES"' >> /mnt/boot/loader.conf echo 'zfs_load="YES"' >> /mnt/boot/loader.conf echo 'vfs.zfs.arc_max="256M"' >> /mnt/boot/loader.conf echo 'zfs_enable="YES"' >> /mnt/etc/rc.conf # disable / and /boot/msdos mounts vi /mnt/etc/fstab zpool export zroot Now you can boot it on a raspberry. /boot/msdos is required to be disabled, because it fails to probe for the label with zfs using /dev/diskid/...s2a You can mount it via /dev/diskid/...s1, but the name is media dependend. You might want to increase vfs.zfs.arc_max to 512MB, depending on your workload. I usually add another identic card via USB reader (or secondary slot in case it is not a Raspberry and has 2 slots) for zmirror. > > Stefan Parvu > sparvu@kronometrix.org > > > > > On 22 Feb 2019, at 17.23, Karl Denninger <karl@denninger.net> wrote: > > > > On 2/22/2019 09:07, Stefan Parvu wrote: > >> Hi, > >> > >> Just curious, would ZFS work on a RBPI3B+ board with 1 GB RAM only > >> using FreeBSD 12 STABLE ? the hardware is 64bit but would it boot on > >> 1 GB RAM for its own ARC internal operations ? > >> > >> Thanks, > >> > >> Stefan Parvu > >> sparvu@kronometrix.org > > > > Are you talking about attempting to mount root off a ZFS filesystem on > > the SD card or booting it as usual and then loading zfs once running > > (e.g. to talk to a USB-attached disk)? > > > > I think you'll find that while it might run it's a very bad idea for a > > whole host of reasons; what purpose do you have in doing this? > > > > -- > > Karl Denninger > > karl@denninger.net <mailto:karl@denninger.net> > > /The Market Ticker/ > > /[S/MIME encrypted email preferred]/ > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" -- B.Walter <bernd@bwct.de> http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190223141404.GQ93368>