Rework FreeBSD start page for newcomer

- Additional instructions to build
- Remove duplicate info about OpenZFS

Co-authored-by: Ryan Moeller <ryan@freqlabs.com>
Co-authored-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: George Melikov <mail@gmelikov.ru>

Apply suggestions from @freqlabs

Co-authored-by: Ryan Moeller <ryan@freqlabs.com>
This commit is contained in:
James Bennett
2020-10-07 23:20:29 +03:00
committed by George Melikov
parent 519ac78dc3
commit 966ebaa629
3 changed files with 66 additions and 38 deletions

View File

@@ -1,22 +1,17 @@
|img|
FreeBSD
=======
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 <https://zfsonfreebsd.github.io/ZoF/>`__
- `OpenZFS site <http://open-zfs.org/>`__
- `OpenZFS repo <https://github.com/openzfs/zfs>`__
|ZoF-logo|
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.
OpenZFS is available pre-packaged as:
- the zfs-2.0-release branch, in the FreeBSD base system from FreeBSD 13.0-CURRENT forward
- the master branch, in the FreeBSD ports tree as sysutils/openzfs and sysutils/openzfs-kmod from FreeBSD 12.1 forward
The rest of this document describes the use of OpenZFS either from ports/pkg or built manually from sources for development.
The ZFS utilities will be installed in /usr/local/sbin/, so make sure
your PATH gets adjusted accordingly.
@@ -30,11 +25,24 @@ 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
- FreeBSD sources in /usr/src or elsewhere specified by SYSDIR in env.
If you don't have the sources installed you can install them with
svnlite.
Install source For FreeBSD 12:
::
svnlite checkout https://svn.freebsd.org/base/stable/12 /usr/src
Install source for FreeBSD Current:
::
svnlite checkout https://svn.freebsd.org/base/head /usr/src
- Packages for build:
::
@@ -42,7 +50,6 @@ The following dependencies are required to build OpenZFS on FreeBSD:
autoconf \
automake \
autotools \
bash \
git \
gmake \
@@ -50,19 +57,21 @@ The following dependencies are required to build OpenZFS on FreeBSD:
::
pkg install python37 # or your preferred Python version
pkg install py37-sysctl # needed for arcstat, arc_summary, dbufstat
- Packages for checks and tests:
::
pkg install \
base64 \
bash \
checkbashisms \
fio \
hs-ShellCheck \
ksh93 \
pamtester \
py37-flake8 \
python37 \
python37 \
sudo
Your preferred python version may be substituted. The user for
@@ -77,28 +86,47 @@ To build and install:
cd zfs
./autogen.sh
./configure
gmake -j$(sysctl -n hw.ncpu)
gmake -j`sysctl -n hw.ncpu`
# as root
gmake install
To use the OpenZFS kernel module when FreeBSD starts, edit ``/boot/loader.conf`` :
Replace the line:
::
zfs_load="YES"
with:
::
openzfs_load="YES"
The stock FreeBSD ZFS binaries are installed in /sbin. OpenZFS binaries are installed to /usr/local/sbin when installed form ports/pkg or manually from the source. To use OpenZFS binaries, adjust your path so /usr/local/sbin is listed before /sbin. Otherwise the native ZFS binaries will be used.
For example, make changes to ~/.profile ~/.bashrc ~/.cshrc from this:
::
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin
To this:
::
PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:~/bin
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.
::
reboot
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 <https://github.com/openzfs/zfs>`__
repo.
Issues
======
Issues can be reported via GitHub's `Issue
Tracker <https://github.com/openzfs/zfs>`__.
.. |img| image:: https://github.com/zfsonfreebsd/ZoF/raw/gh-pages/zof-logo.png
.. |ZoF-logo| image:: /_static/img/logo/zof-logo.png