Short Attention Span Theatre

ZFS and NAStie and i386 and not reading the specification

Ahem.

Apparently one should not skim the docs when putting together a server. Apparently one should actually read the portion which tells you what type of processor you have (for example, if you have a 64-bit processor). Oc­ca­sion­al­ly that type of in­for­ma­tion would be useful... like... say... when you are trying to get your FreeBSD in­stal­la­tion using ZFS to be stable, which it is NOT on 32-bit (ok, some small portion of the population has aligned the stars, but I did not)! One should not depend on ones memory when one thinks, "Self, that system is old so the processor must be 32-bit," and does not check to be sure.

Yep... I noticed a few days ago the Pentium 4 2.8 GHz processor in my server is indeed 64-bit, silly me. So I im­me­di­ate­ly attempted to load 9.0-RC2, only to have it fail to boot. RC1 (off of PC-BSD) failed as well, and then I was off and running in an attempt to find out what caused this PR (filed recently).

After digging a bit I discovered the mfsBSD images, a ZFS boot howto, and re-discovered the FreeBSD Wiki page on ZFS booting. Those gave me everything I needed to get back up and running using an amd64 image.

So, first thing was to download the ISO from the mfsBSD page (8.2p2 special edition) and boot... it works! The zfsinstall command line I used follows.

# zfsinstall -d ad6 -t /cdrom/8.2-RELEASE-p2-amd64.tar.xz -s 8G -p nastie

After install I rebooted (instead of chrooting into /mnt) into the new en­vi­ron­ment, and it had that new car smell... mmmm. Anyway, tasks I did right after reboot.

I created lots of other mount­points (the default only creates /, /var, /tmp) following the FreeBSD Wiki page.

Note about this: Remember to make sure you move any di­rec­to­ries/files out of the way before creating the mount point... confusion reigned for a moment until my brain caught up with my fingers.

New mount­points created (from the wiki - all commands copied from the wiki and modified for my setup) follow. BUYER BEWARE: I am only showing the commands necessary to create mount­points and set options, not those necessary to destroy the already created mount­points or move files out of the way while creating a mountpoint which was already created as a directory when installing mfsBSD.

Set the checksum algorithm.

# zfs set checksum=fletcher4 zroot

Create /tmp and set the proper per­mis­sions.

# zfs create -o compression=lzjb -o exec=on -o setuid=off nastie/root/tmp
# chmod 1777 /tmp

Create the /usr and /usr/home.

# zfs create nastie/root/usr
# zfs create nastie/root/usr/home
# cd / ; ln -s /usr/home home

Create the ports hierarchy.

# zfs create -o compression=lzjb -o setuid=off nastie/root/usr/ports
# zfs create -o compression=off -o exec=off -o setuid=off nastie/root/usr/ports/distfiles
# zfs create -o compression=off -o exec=off -o setuid=off nastie/root/usr/ports/packages

Use the src, Luke!

# zfs create -o compression=lzjb -o exec=off -o setuid=off nastie/root/usr/src

A variety of various sub­di­rec­to­ries of var.

# zfs create nastie/root/var
# zfs create -o compression=lzjb -o exec=off -o setuid=off nastie/root/var/crash
# zfs create -o exec=off -o setuid=off nastie/root/var/db
# zfs create -o compression=lzjb -o exec=on -o setuid=off nastie/root/var/db/pkg
# zfs create -o exec=off -o setuid=off nastie/root/var/empty
# zfs create -o compression=lzjb -o exec=off -o setuid=off nastie/root/var/log
# zfs create -o compression=gzip -o exec=off -o setuid=off nastie/root/var/mail
# zfs create -o exec=off -o setuid=off nastie/root/var/run
# zfs create -o compression=lzjb -o exec=on -o setuid=off nastie/root/var/tmp
# chmod 1777 /var/tmp
# zfs set readonly=on nastie/var/empty

Finally the service NAStie will provide.

# zfs create -o compression=lzjb -o exec=off -o setuid=off nastie/root/srv

That sets up the file systems. Now all that needs to be done is add a normal user and start setting up the services on the machine. It is in­ter­est­ing that this was much faster than installing normally. Have to look into building my own custom release sometime.

I will add anything I notice must be done, but between this post, Getting NAStie with ZFS, and Rebuilding NAStie I should be able to re­con­struct this server.

Cygwin terminate batch annoyance » « Automate ZFS install on NAStie using mfsBSD
sast favicon