BackBox 6.0 on mirrored zfs boot SSD - solved

Started by O Z, September 12, 2019, 12:02:14 AM

Previous topic - Next topic

O Z

Hi All,  My first time here so I thank all involved in this distro.  I really love it.

Background
I recently followed this https://github.com/zfsonlinux/zfs/wiki/Ubuntu-18.04-Root-on-ZFS guide to see how responsive the installation would be.  On my i7-8700 @ 3.20GHz with 32GB 2400 DDR4 it was quite acceptable considering all the advantages of mirrored zfs. Ubuntu desktop however was (from my perspective) as poor as its design.

Quote from section 3.4  in the guide;

3.4 Install the minimal system:

# debootstrap bionic /mnt
# zfs set devices=off rpool

The debootstrap command leaves the new system in an unconfigured state. An alternative to using debootstrap is to copy the entirety of a working system into the new ZFS root.

End Quote

So I attempted to copy a BackBox 6 USB installation in place of Ubuntu but It all went horribly wrong and failed to boot.

Question
Running debootstrap bionic /mnt worked although with a fair bit of post installation configuration. Could debootstrap be used with BackBox and what about all the configuration within BB6 ?

Best regards,
oz

Updated
I have been using BB6 on a zfs boot mirror for a couple of months now without issue so here are a few tips to help others achieve the same level of reliability that zfs can offer.

Caveat
If you use BB6 as it comes without modification (which is fantastic by the way) then this will be of little interest to you.  However if you use BB6 as a base OS for your main day to day desktop workhorse and have invested lots of time and effort installing apps and tools that are relevant to your areas of interest then this may be for you.

Tips and overall approach
There are many steps in the guide that require tweaks to match your disk/by-id labels etc. so I found it helps minimise mistakes by having the guide available off-line on the installation media.  I had a terminal open  showing ls -l /dev/disk/by-id, an editor window containing the guide, an editor window as a scratchpad for your edited steps and a final terminal for command execution.

I decided to install to just a single UEFI bootable SSD and then once satisfied that all was OK I added a second drive for mirrored redundancy.  If you choose a usb flash drive for your installation media then make sure it is quite high spec. (good read/write bandwidth and high iops/s) otherwise you may think a command has hung.

Follow the guide to step 3.4 and use:-

$ rsync -avPX --exclude=/dev --exclude=/proc --exclude=/sys --exclude=/run /backbox/root/ /mnt

to copy your entire BB6 root file system with all your favorite  apps (mounted at /backbox/root) to the new zfs target disk (mounted at /mnt).

Choice of drives
You should use the best quality drives that you can afford.  Also I read somewhere that mirrored drives should be of the same make/model but with differing levels of wear.  This is so that when one goes down there is enough life in the other to accommodate a replacement before it too starts to fail.

Your desktop is now on the path to immortality.  No more running out of disk space and stress free rapid rollback from all kinds of trouble that used to take hours/days/weeks of painful recovery.

Good luck.

Oz