ZFS

Started by Aadolf, January 14, 2017, 04:10:45 PM

Previous topic - Next topic
This is awesome!

Thanks for the information. I am confused though, why was the standard BSD bootstrap deviated from.  Was this an opnsense design decision or was it inherited from the pfsense fork? If the latter does anyone know the reason?

Quote from: franco on May 03, 2018, 05:25:08 PM
It was state here very recently: https://forum.opnsense.org/index.php?topic=8521.0

Translated:

Requires time for development. Every now and then somebody brings up a new networking feature they want to merge and that is subsequently prioritised... :)

We need to do two things:

1. ZFS Boot Awareness: With a FreeBSD on ZFS you can install OPNsense using opnsense-bootstrap, but the system won't boot because /usr/local/etc/rc is not aware of ZFS and the kernel module is missing.

2. When 1. is done the installer needs to gain a ZFS installation mode.


Cheers,
Franco

Hi there,

"standard BSD bootstrap" is highly confusing. ZFS is only available in FreeBSD, and assuming by bootstrap you mean bootup of FreeBSD.

M0n0wall was forked from FreeBSD pre-ZFS and since used a custom bootup sequence partially based on PHP. This was inherited by pfSense and subsequently OPNsense.

As far as I'm aware M0n0wall never had ZFS support. pfSense gained ZFS boot support, but until we forked it was never in state where the shipped installer was able to install a ZFS. When the time came to fork pfSense we removed the ZFS boot support because we couldn't verify it either way because we also inherited the lack of ZFS installer support.

Later pfSense switched from the original bsdinstaller to the bsdinstall in FreeBSD which brought them ZFS installer support. That work is still pending with us, although I think we will stick with the bsdinstaller for the foreseeable future and modify it accordingly.


Cheers,
Franco

Just installed it. Works great! Thanks


18.1.8 is out with the ZFS changes included, so now I'd advise use of...

# pkg install ca_root_nss
# fetch https://raw.githubusercontent.com/opnsense/update/master/bootstrap/opnsense-bootstrap.sh
# sh ./opnsense-bootstrap.sh

as documented via https://github.com/opnsense/update#opnsense-bootstrap


Cheers,
Franco

Works well with 2.1.9.

I can attest to it working on a raidz2 pool with six drives. I stacked three dual m.2 to sata adapters (also can be dual mSATA but not both at the same time) with Sata M.2 drives. The motherboard is a six SATA port eight Intel Nic Jetway with an i7.

Quote from: franco on May 17, 2018, 01:18:43 PM
18.1.8 is out with the ZFS changes included, so now I'd advise use of...

# pkg install ca_root_nss
# fetch https://raw.githubusercontent.com/opnsense/update/master/bootstrap/opnsense-bootstrap.sh
# sh ./opnsense-bootstrap.sh

as documented via https://github.com/opnsense/update#opnsense-bootstrap


Cheers,
Franco

I should mention that when installing BSD 11.1, the networking is not as user friendly as the OPNsense installer, you have to choose Unbound before rebooting after BSD installs or you won't be able to install the package manager and OPNsense. I don't recall seeing the other resolver as an option. Once OPNsense is installed, do not forget that the root password is opnsense at this point, not what you chose during the BSD install. This would be the time to change your root password and networking, then you are up and running.

Hello, I just wanted to add that this is epic, OPNsense + ZFS + Boot Environments(beadm). 8)

I'm really happy this solution is working as expected on top of vanilla FreeBSD 11.1, brings me peace of mind that I'm backed by Boot Environments before upgrades/system wide changes.

Regards

Hi,

beadm is already in our packages repository for manual install. If somebody wants to write a plugin that would be fantastic.


Cheers,
Franco

Hello, this may seems a bit redundant for many as "beadm" commands are extremely simple, but I've created a cdialog driven little tool to help mostly newbies to work with Boot environments from a TUI manager for convenience. ::)

I posted brief install instructions HERE though, I'm also currently using it on OPNsense.

Regards

Thank you, that's great. Maybe we can use it as a guide to plugin development some time during 18.7.x ? :)


Cheers,
Franco

That would be great, I will be up for any testing when it's time though, for now I'm more than happy that my  hardware is working exceptionally well with OPNsense/ZFS. 8)

Regards

July 06, 2018, 01:36:13 PM #28 Last Edit: July 12, 2018, 07:02:24 AM by Jose
Sorry to poke here again, I just wanted to post my latest simple beadm TUI wrapper, it now supports full Boot Environments replication to .xz compressed files, this creates a replica(zfs send) of your last saved Boot Environment/Snapshot(I use zfsnap for rolling snapshots), then piped to xz regardless of the ZFS RAIDX used.

This can be later restored if you lost your boot drive(s) or simply want to replicate pre-configured setups to alternate hardware/VM's for convenience, note that this tool can backups your BE's to same boot drive as well(I use a 2.5" 250GB HDD w/o issue) and later exported to whatever location or even your desktop with simple tools like FileZilla/WinSCP through SSH, but is not limited to, you can edit the tool and save BE's to a network location as well.

This might help someone with PHP skills to make a similar(optional) plugin I think, Bemanager at GitHub.

Images and sample config file HERE

Regards

For multiple personal reasons, I'm not able to finish the ZFS installer support for the initial 18.7.


Cheers,
Franco