Home Storage Servers Stratis to create layered storage in RedHat Enterprise Linux 8

Stratis to create layered storage in RedHat Enterprise Linux 8



Stratis is a new local storage management tool available in RHEL 8, it will help to create layered storage on top of block devices. Stratis will run as a daemon in the name stratisd, as well come with a command-line configuration tool called stratis-cli which facilitate users to create, modify or delete pools and file systems.

In Red Hat Enterprise Linux 8 Stratis will be available by installing two packages. Before in RHEL 7.x, we have the BTRFS file system, Red Hat removed BTRFS support in RHEL 8 and provided with Stratis layered storage management system.

To start with Stratis we need to add a number of block devices and create as a single pool, Inside a Stratis pool multiple numbers of file systems can be created. Stratis cannot be created on top of existing thin provisioned disks instead we need to use with hard drives, iSCSI, logical volumes, Multi path devices or NVMe.

Once RHEL 8 move from beta to production stratis will available in CentOS 8 as well. Moreover, Stratis will support only on kernel version greater than 4.14.

More topics on Stratis storage management:

Installing Stratis

Now let us start to install required packages by resolving dependencies.

The package “stratisd” and “stratiscli” will be available from AppStream and few of python dependecies will be downloaded from BaseOS repository. Make sure to create a repo file with BaseOS and AppStream repository entry.

# yum install stratis-cli stratisd -y
# dnf install stratis-cli stratisd -y
[root@linuxsysadmins ~]# yum install stratis-cli stratisd -y
Updating Subscription Management repositories.
Last metadata expiration check: 0:00:15 ago on Mon 04 Feb 2019 02:18:49 AM +04.
Dependencies resolved.
Package Arch Version Repository Size
stratis-cli noarch 1.0.0-2.el8 AppStream 50 k
stratisd x86_64 1.0.0-2.el8 AppStream 1.2 M
Installing dependencies:
python3-dbus-client-gen noarch 0.3-1.el8 AppStream 25 k
python3-dbus-python-client-gen noarch 0.6-2.el8 AppStream 24 k
python3-dbus-signature-pyparsing noarch 0.03-2.el8 AppStream 19 k
python3-into-dbus-python noarch 0.06-2.el8 AppStream 27 k
python3-justbases noarch 0.9-6.el8 AppStream 45 k
python3-justbytes noarch 0.11-2.el8 AppStream 40 k
python3-pyparsing noarch 2.1.10-7.el8 BaseOS 142 k
Transaction Summary
Install 9 Packages
stratis-cli-1.0.0-2.el8.noarch stratisd-1.0.0-2.el8.x86_64
python3-dbus-client-gen-0.3-1.el8.noarch python3-dbus-python-client-gen-0.6-2.el8.noarch
python3-dbus-signature-pyparsing-0.03-2.el8.noarch python3-into-dbus-python-0.06-2.el8.noarch
python3-justbases-0.9-6.el8.noarch python3-justbytes-0.11-2.el8.noarch
[root@linuxsysadmins ~]#

Once completed with installing Stratis start and enable the service persistently, By following verify and confirm the status.

# systemctl start stratisd.service
# systemctl enable stratisd.service
# systemctl status stratisd.service
Stratisd Service Status

List the available disks:

We have added with 5 numbers of 2 TB disks, let us list to verify the size. Now we are going to use only 4 disks in this guide, later in the upcoming article “adding the additional disks” the 5th disk will be used.

# lsblk
# fdisk -l
Stratis list the available  block devices
List the available block devices

Free Up the disks to use for stratis:

In case if the disk has any existing old data or headers we need to verify and wipe it off. Replace “sdb” with available disks.

# blkid -p /dev/sdb
# wipefs -a /dev/sdb

List the existing pools and filesystem:

Before creating with any pools and filesystem list and verify.

# stratis blockdev list
# stratis pool list
# stratis filesystem list
Stratis list to verify existing block, pool and fs
List to verify existing block, pool and fs

Create the pool and filesystem:

First let us create and list the pool in the name of “data01_pool“. To create the pool use 4 disks from /dev/sdb to /dev/sde.

# stratis pool create data01_pool /dev/sd[b-e]
# stratis pool list
Create pool and list it.
  1. The number of disks used to create the pool.
  2. Created pool name.
  3. The total size of the created pool.
  4. Size of file system created in it.
  5. To list the block devices used in a pool.
  6. Devices name /dev/sda, /dev/sdb etc.
  7. Each size of disks.
  8. Disk showing “In-use” is used and contains data.
  9. Disks tier, whether used for Data or for Cache.

Once the pool created, list and check the block devices used in stratis pool.

# stratis blockdev list

Now start to create the file system from the “data01_pool” pool.

# stratis filesystem create data01_pool user_data01
# stratis filesystem create data01_pool user_data02

List the created file systems.

# stratis filesystem list
# stratis fs list
Stratis Creating file System
Stratis Creating file System
  1. Creating a file system from a pool.
  2. List the file System.
  3. The Created file system name.
  4. Currently used FS size.
  5. When created.
  6. Device name created for FS.

Mount the created file systems:

Once the file system created from the pool, create a mount point and mount the FS. By default, while creating FS it will format it with XFS file System.

# mkdir /user_data01
# mkdir /user_data02
# mount /dev/stratis/data01_pool/user_data01 /user_data01/
# mount /dev/stratis/data01_pool/user_data02 /user_data02/

Create some files inside the mount point and list it again to verify the utilization.

# df -hP /user_data0*
Create mount point and mount the FS
Create mount point and mount the FS
  1. Created file system using stratis.
  2. Size of each mounted file system.

Adding FSTAB entry:

Make the mount point persistent across reboot by entering FSTAB entry by getting the UUID of mounted file system.

# blkid | tail -n 2
[root@linuxsysadmins ~]# blkid | tail -n 2
/dev/mapper/stratis-1-0eaf62ae5c9c4725a3188d7e2a10383e-thin-fs-4e85082029104b0aadd506a440930f3a: UUID="4e850820-2910-4b0a-add5-06a440930f3a" TYPE="xfs"
/dev/mapper/stratis-1-0eaf62ae5c9c4725a3188d7e2a10383e-thin-fs-d5cc59e30aad49da811d7e57f2e1f1e2: UUID="d5cc59e3-0aad-49da-811d-7e57f2e1f1e2" TYPE="xfs"
[root@linuxsysadmins ~]#

Edit the /etc/fstab and amend with UUID to respective mount point.

# vi /etc/fstab
FSTAB Entry for mounted FS

Update the systemd unit by running “systemctl daemon-reload”.

Check the Stratis Daemon Version:

To check the Stratis running daemon version use.

# stratis daemon version
Check Stratis Daemon Version

That’s it we have created an XFS file system using Stratis. More topics on Stratis will be covered in upcoming articles.


In this guide, we have seen Stratis local storage management which available in Red Hat Enterprise Linux 8 to create a layered storage pool and filesystem. In upcoming guides let us cover with adding additional disk to the existing pool and removing an fs and pool. Subscribe to our newsletters to receive more topics related to Linux guides, Your valuable comments and critics are most welcome.



Please enter your comment!
Please enter your name here

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

We promise not to spam you, and we don't usually send more than one email a week.

You have Successfully Subscribed!