A daemon that manages a pool of block devices to create flexible filesystems.
September 28 2018: Stratis 1.0 released. See release notes for details.
Stratis (which includes stratisd
as well as stratis-cli),
provides ZFS/Btrfs-style features by integrating layers of existing technology:
Linux's devicemapper subsystem, and the XFS filesystem.
collections of block devices, and exports a D-Bus API. Stratis-cli's
provides a command-line tool which itself uses the D-Bus API to communicate
If you have questions, please don't hesitate to ask them, either on the mailing list or
Stratisd is written in Rust, which helps the implementation be small, correct, and avoid requiring shipping with a large language runtime.
Issue tracking and Development
Stratisd development uses GitHub issue tracking, and new development occurs via GitHub pull requests (PRs). Patches or bug reports may also be sent to the mailing list, if preferred.
Setting up for development
Dbus configuration file
Stratisd runs as root, and requires access to the D-Bus system bus. Thus in
order to work properly, a D-Bus conf file must exist to grant access, either
installed by distribution packaging; or manually, by copying
Stratisd requires Rust 1.25+ and Cargo to build. These may be available via your distribution's package manager. If not, Rustup is available to install and update the Rust toolchain.
Stratisd makes use of
rustfmt to enforce consistent formatting in Rust
files. PRs must pass the
fmt task in the CI in order to be merged. The
fmt task currently uses rustfmt-preview (pinned to 0.6.1, as shipped with
Getting correct rustfmt (Fedora 28 x86_64)
Since Fedora now ships with a newer version of rustfmt, one must get the old version and lock the version.
sudo rpm -Uvh https://kojipkgs.fedoraproject.org//packages/rust/1.27.2/3.fc28/x86_64/rustfmt-preview-0.6.1-3.fc28.x86_64.rpm
sudo dnf install python3-dnf-plugin-versionlock
sudo dnf versionlock add rustfmt-preview
Getting correct rustfmt (Other distros and archs)
Use Rustup. The proper version of rustfmt (0.6.1) shipped with Rust 1.27.2.
- Install Rustup as shown on the Rustup website
- Logout and back in to ensure $PATH includes
rustup default 1.27.2
rustup component add rustfmt-preview
The rust library dbus-rs has an external dependency on the C dbus library dbus development library. Please check with your distributions package manager to locate the needed package.
The files needed to build dbus-rs include, but are not limited to:
/usr/include/dbus-1.0/dbus/dbus*.h /usr/lib64/libdbus-1.so /usr/lib64/pkgconfig/dbus-1.pc
Also, the rust library libudev-sys has an dependency on the C libudev library. Please check with your distributions package manager to locate the needed package (e.g libudev-dev for Debian-based, systemd-devel for Fedora RPM-based Linux distributions).
At least, you need to include:
Once toolchain and other dependencies are in place, run
cargo build to build, and then run the
stratisd executable in
./target/debug/ as root. Pass the
for more information on additional developer options.
To reformat all files to ensure proper formatting, run
cargo fmt to ensure
your changes conform to the expected formatting before submitting a pull request.
Stratisd incorporates two testing modalities:
- safe unit tests, which can be run without affecting your storage configuration
- unsafe unit tests, which may create and destroy devices during execution
To run the safe unit tests:
$ make test
For a description of the unsafe unit tests, necessary setup steps, and how to
run them, see
MPL 2.0. All contributions retain ownership by their original author, but must also be licensed under the MPL 2.0 to be merged.