As discussed in Part 1[1] and Part 2[2] of this series, Stratis is a volume-managing filesystem with functionality similar to that of ZFS[3] and Btrfs[4]. In this article, we'll walk through how to use Stratis on the command line.
Getting Stratis
For non-developers, the easiest way to try Stratis now is in Fedora 28[5].
Once you're running this, you can install the Stratis daemon and the Stratis command-line tool with:
# dnf install stratis-cli stratisd
Creating a pool
Stratis has three concepts: blockdevs, pools, and filesystems. Blockdevs are the block devices, such as a disk or a disk partition, that make up a pool. Once a pool is created, filesystems can be created from it.
Assuming you have a block device called vdg
on your system that is not currently in use or mounted, you can create a Stratis pool on it with:
# stratis pool create mypool /dev/vdg
This assumes vdg
is completely zeroed and empty. If it is not in use but has old data on it, it may be necessary to use pool create
's - force
option. If it is in use, don't use it for Stratis.
If you want to create a pool from more than one block device, just list them all on the pool create
command line. You can also add more blockdevs later using the blockdev add-data
command. Note that Stratis requires blockdevs to be at least 1 GiB in size.
Creating filesystems
Once you've created a pool called mypool
, you can create filesystems from it: