Blog

The eisy way!

eisy

Introductions

Well, it's become obvious that our instructions to supercharge your eisy was just a little too geeky for many. You see, when you are a geek, you presume things that are usually not true.

First and foremost, please accept our apologies. Secondly, in this blog we will walk you through supercharging your eisy the eisy way! Using our latest, not only you will be able to boot from NVMe but you will get to provide the size of the partition that you want to use for a VM (say Home Assistant) as well as decide what to do with the mirror.

Before we proceed, for parts and assembly instructions as well as the reasons for supercharing your eisy, please see here. If you are ready, let's get going ...

Configure the OS

Warning

The procedures below will wipe out everything you might already have on your NVMe!

Tip

Although these procedures were designed to be lossless, it's  
always recommended to backup your ZMatter USB, your IoX, 
and your PG3x. 

ssh to eisy

  1. On Mac, open the terminal app (search | terminal)
  2. On Windows, open the command prompt (search | cmd)
  3. Type:
    ssh admin@eisy.local
  1. When prompted, type in the password. Default is admin. If you have not already changed the password, change it immediately.

All sudo may prompt you for the password. Please use the password in step 4.

Get udx

Make sure you have udx version 3.5.5_4 or above:

	pkg info udx | head | grep -i version

You should see this:

	Version        : 3.5.5_4

If your udx version is not 3.5.5_4, you will need to install it from our staging repo. No worries, we do have a tool that allows you to easily switch your repo:

	curl -s https://pkg.isy.io/script/repo.util -O

This will download repo.util script and saves it into your current directory. You will now need to make it executable:

	chmod +x repo.util

Now, you are ready to change the repo to staging:

	sudo ./repo.util

You will be asked whether or not you want to switch to staging, type Y (case sensitive):

	Do you want to switch to Staging? (Y,n)
	>>Y
	Updating udi repository catalogue...
	Fetching meta.conf: 100%    163 B   0.2kB/s    00:01    
	Fetching packagesite.pkg: 100%    9 KiB   9.2kB/s    00:01    
	Processing entries: 100%
	udi repository update completed. 11 packages processed.
	All repositories are up to date.

Now, install udx from this repo:

	sudo pkg install -fy udx

And watch it install and restart udx!

Immediatly switch back to our production repo:

	sudo ./repo.util

Tip

repo.util is included in the latest udx package and in your path, so you don't have to deal with curl in the future!

Now, you are ready to bring your NVMe to life!

Configure NVMe

And this is the eisy part! We now have a script that helps you with configuration! It's called fl.ops and it's in your path. All you have to do is:

	sudo fl.ops setup.nvme.boot 

You will get:

	executing from /usr/local/etc/udx.d/static
 	nvme0: WD Blue SN580 1TB
    	nvme0ns1 (953869MB)
	WARNING: your nvme has existing paritions and data.
	And it is bootable!!!!
	This script will wipe everything on your nvme; it is irreversible!
	Are you sure you want to run this script?
	Please answer with Y to proceed with this irreversible operation. 
	Anything else cancels this operation.

If you are ready to take the plunge, click on Y (case sensitive).

Warning

If your NVMe is already configured as bootable without a mirror, 
the script will detect and warn you. It will also ask you whether 
or not you want the script to try and fix it. If you say Yes, 
the script will do its best to clean things up and then ask you 
to reboot. Once rebooted just redo:
sudo fl.ops setup.nvme.boot

At this juncture, you are now asked whether or not you want to create a zfs partition for your virtual machine (VM).

If you say yes, the script will automatically create a partition of your desired size, and if you wish, it will install zfs filesystem on it, and mounts it to /storage. This way, you don't have to do anything but to run the vm script such as the one described here.

In this example, we are going to assign 256G for storage. Please note that the size you choose must leave at least 256GB for IoX.

	nvd0 created
	Thu Feb 22 02:54:33 PST 2024|/usr/local/etc/udx.d/static/fl.ops: calcuating size ... keeping 8GB for recovery  
	Thu Feb 22 02:54:33 PST 2024|/usr/local/etc/udx.d/static/fl.ops: size, excluding swap and ud specific, is 919 GB ...  
	Would you like to add an extra ZFS partition for your own purposes? (Y/n)
	>>Y
	Please provide the size in GB. Please note that you must leave at least 256GB for iox
	>>256
	Thu Feb 22 02:59:54 PST 2024|/usr/local/etc/udx.d/static/fl.ops: will create a ZFS user size of 256 ...   
	Thu Feb 22 02:59:54 PST 2024|/usr/local/etc/udx.d/static/fl.ops: adding the boot partition to nvd0 ...  
	nvd0p1 added
	Thu Feb 22 02:59:54 PST 2024|/usr/local/etc/udx.d/static/fl.ops: adding the iox/zfs partition of size 663GB...   
	nvd0p2 added
	Thu Feb 22 02:59:54 PST 2024|/usr/local/etc/udx.d/static/fl.ops: creating ms dos file system on partition 1 ...  
	/dev/nvd0p1: 129022 sectors in 129022 FAT32 clusters (512 bytes/cluster)
	BytesPerSec=512 SecPerClust=1 ResSectors=32 FATs=2 Media=0xf0 SecPerTrack=63 Heads=255 HiddenSecs=0 HugeSectors=131072 FATsecs=1008 RootCluster=2 FSInfo=1 Backup=2
	Thu Feb 22 02:59:54 PST 2024|/usr/local/etc/udx.d/static/fl.ops: mouting ms dos file system (for boot) ...   
	Thu Feb 22 02:59:54 PST 2024|/usr/local/etc/udx.d/static/fl.ops: adding boot loader to boot partition ...   
	Thu Feb 22 02:59:54 PST 2024|/usr/local/etc/udx.d/static/fl.ops: unmounting boot parition ...  
	Thu Feb 22 02:59:54 PST 2024|/usr/local/etc/udx.d/static/fl.ops: attching ssd to existing zudi pool for copying files from emmc to ssd ...  
	Thu Feb 22 02:59:55 PST 2024|/usr/local/etc/udx.d/static/fl.ops: adding the swap partition ...  
	nvd0p3 added
	Thu Feb 22 02:59:55 PST 2024|/usr/local/etc/udx.d/static/fl.ops: adding user/zfs partition of size 256GB ...  
	nvd0p4 added

You will have to wait a few seconds for the system to mirror the eMMC to your newly minted NVMe:

	please continue to wait while creating a copy in nvd0P2 (resilvering)...

Once the mirroring is completed, you will be asked whether or not you want to create a zfs pool called storage.

The reason you might want to consider this is that you won't have to worry about paritions, labels, pools, zfs, etc. when you are configuring your vm. The storage parition is immedidately available in /storage directory.

	would you like to create a zfs pool in the storage space you just created? (Y/n)
	>>Y

And finally, you will be asked whether or not you want to keep the mirror. Initially, and till you are happy with everything, it's best to keep the mirror. Don't worry, you can always remove it later with one simple command:

	sudo fl.ops remove.emmc.mirror

While deciding on whether or not to keep the mirror, think about what you would like your configuration to look like:

  1. High Performance + Redundancy, or
  2. Highest performance and no Redundancy.

As with everything else, there are Pros and Cons:

Keeping the mirror (Redundancy)

In this scenario, you will have NVMe SSD and the eMMC mirror each other.

Pros

  • You will have a mirror of everything
  • Will automatically switch to eMMC is NVMe SSD failes
  • You can boot from either one (needs a monitor)

Cons

  • Regardless of your NVME capacity, you are limited to the size of the eMMC
  • The slowest (eMMC) performance decides the system throughput
  • You cannot use eMMC for anything else

Highest performance

In this scenario, all partitions on eMMC are deleted and destroyed.

Pros

  • Higher performance
  • Less things to maintain

Cons

  • If it fails, it needs to be replaced.

You are done!

Once you reboot, and regardless of the choice you made for mirror, your eisy will boot from your nvme. So, why don't you reboot?

	sudo shutdown -r now

Additional commands

Remove the emmc mirror

Let's say you chose to keep the mirror and now regret your decision! Well, now worries, you can remove the mirror with one simple command:

	sudo fl.ops remove.emmc.mirror

Make sure you reboot after:

	sudo shutdown -r now

Tip

Although the IoX Partition should expand on its own after the miror ir removed, you can also do it on your own by issuing:
sudo fl.ops expand.iox.pool 
(see Expanding IoX pool)

Revert to emmc boot

Let's say you have the mirror and booting from nvme. For whatever reason, you want to start booting from eMMC intead:

	sudo fl.ops revert.to.emmc.boot 

Make sure you reboot after:

	sudo shutdown -r now

Expand IoX pool to take over the whole partition

There might be cases where the IoX pool does not expand to the max size of the partition. Fear not! One simple command is all you need:

	sudo fl.ops expand.iox.pool                                                                                                                                              

Make sure you reboot after:

	sudo shutdown -r now