ZFS on Linux is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the OpenZFS community.
Full documentation for installing ZoL on your favorite Linux distribution can be found at our site.
We have a separate document with contribution guidelines.
In addition to standard dependencies of ZFS on Linux project following packages need to be installed:
sudo apt-get install libaio-dev libgtest-dev cmake libjemalloc-dev
Google test framework library does not have a binary package so it needs to be compiled manually:
cd /usr/src/gtest
sudo cmake -DBUILD_SHARED_LIBS=ON CMakeLists.txt
sudo make
# copy or symlink libgtest.a and libgtest_main.a to your /usr/lib folder
sudo cp *.so /usr/lib
Special configure option --enable-debug
should be used in order to create
zfs and zpool commands which don't call into the kernel using ioctls, but
instead call into uZFS process for serving "ioctls" using tcp connection.
Other than that the build steps are the same as for ZoL:
./autogen.sh
CFLAGS="-g -O0" ./configure --enable-debug --enable-uzfs=yes
make
This assumes that you have configured zfs with --enable-uzfs=yes
option.
To try zpool and zfs commands, start cmd/tgt/tgt
binary with sudo
and
leave it running. Now zpool and zfs commands from cmd/ directory can be
used in usual way.
Disk write cache must be disabled for any device not managed by linux sd driver. Cache flush is not supported for other drivers than sd.
Make sure to run cstyle on your changes before you submit a pull request:
make cstyle
And assure that the tests are passing. For possible tests to run see .travis.yml file in root directory. Here is an example of running a couple of available tests:
cmd/ztest/ztest -V
tests/cbtest/gtest/test_uzfs
sudo tests/cbtest/script/test_uzfs.sh