From 519ac78dc301d0c2da046ce7dc5ee2c768f6984d Mon Sep 17 00:00:00 2001 From: George Melikov Date: Wed, 7 Oct 2020 22:55:55 +0300 Subject: [PATCH] Convert FreeBSD page as is from ZoF repo Signed-off-by: George Melikov --- docs/Getting Started/FreeBSD.rst | 104 +++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 docs/Getting Started/FreeBSD.rst diff --git a/docs/Getting Started/FreeBSD.rst b/docs/Getting Started/FreeBSD.rst new file mode 100644 index 0000000..5c0a743 --- /dev/null +++ b/docs/Getting Started/FreeBSD.rst @@ -0,0 +1,104 @@ +|img| + +OpenZFS is an advanced file system and volume manager which was +originally developed for Solaris and is now maintained by the OpenZFS +community. + +Official Resources +================== + +- `ZoF GitHub Site `__ +- `OpenZFS site `__ +- `OpenZFS repo `__ + +Installation on FreeBSD +======================= + +OpenZFS is available in the FreeBSD ports tree as sysutils/openzfs and +sysutils/openzfs-kmod. It can be installed on FreeBSD stable/12 or +later. + +The ZFS utilities will be installed in /usr/local/sbin/, so make sure +your PATH gets adjusted accordingly. + +To load the module at boot, put ``openzfs_load="YES"`` in +/boot/loader.conf, and remove ``zfs_load="YES"`` if migrating a ZFS +install. + +Beware that the FreeBSD boot loader does not allow booting from root +pools with encryption active (even if it is not in use), so do not try +encryption on a pool you boot from. + +Development on FreeBSD +====================== + +The following dependencies are required to build OpenZFS on FreeBSD: + +- FreeBSD sources in /usr/src or elsewhere specified by SYSDIR in env +- Packages for build: + :: + + pkg install \ + autoconf \ + automake \ + autotools \ + bash \ + git \ + gmake \ + +- Optional packages for build: + :: + + pkg install python37 # or your preferred Python version + +- Packages for checks and tests: + :: + + pkg install \ + base64 \ + checkbashisms \ + fio \ + hs-ShellCheck \ + ksh93 \ + pamtester \ + py37-flake8 \ + python37 \ + sudo + + Your preferred python version may be substituted. The user for + running tests must have NOPASSWD sudo permission. + +To build and install: + +:: + + # as user + git clone https://github.com/openzfs/zfs + cd zfs + ./autogen.sh + ./configure + gmake -j$(sysctl -n hw.ncpu) + # as root + gmake install + +Though not required, ``WITHOUT_ZFS`` is a useful build option in FreeBSD +to avoid building and installing the legacy zfs tools and kmod - see +``src.conf(5)``. + +For rapid development it can be convenient to do a UFS install instead +of ZFS when setting up the work environment. That way the module can be +unloaded and loaded without rebooting. + +Contributing +============ + +Submit changes to the `openzfs/zfs `__ +repo. + +Issues +====== + +Issues can be reported via GitHub's `Issue +Tracker `__. + +.. |img| image:: https://github.com/zfsonfreebsd/ZoF/raw/gh-pages/zof-logo.png