BLOG POSTS
Configure Storage Pools with stratis-cli & stratisd

Configure Storage Pools with stratis-cli & stratisd

Why Should You Care About Storage Pools with Stratis?

If you’re running a cloud server, Docker host, VPS, or a dedicated box, you’ve probably hit the “disk management headache” wall at some point. Maybe you’re juggling multiple disks, want to grow your storage without downtime, or need to keep your data safe from accidental loss. Traditional Linux tools like mdadm, LVM, or even ZFS can be powerful, but they’re not always the friendliest for quick, practical setups—especially if you want something that “just works” with minimal fuss.

Enter Stratis: a modern, user-friendly storage manager for Linux that brings together the best parts of LVM and ZFS, but with a much simpler interface. If you’re looking for a way to manage storage pools on your server (cloud, VPS, or bare metal) with minimal pain, stratis-cli and stratisd might just be your new best friends.

What’s the Big Deal? The Problem Stratis Solves

  • Growing storage on the fly: Need to add more disks to your server? Stratis lets you expand your storage pool without downtime or complex reconfiguration.
  • Snapshots and thin provisioning: Want to take quick backups or create new volumes without wasting space? Stratis has you covered.
  • Simple commands, less drama: No more deciphering cryptic lvm or zpool commands. Stratis is designed to be straightforward.
  • Great for containers and VMs: If you’re spinning up Docker containers or KVM guests, Stratis makes it easy to allocate and manage storage.

Three Core Questions (And Answers!)

  1. How does Stratis actually work under the hood?
  2. How do you set it up quickly on your server?
  3. What are the real-world pros and cons compared to other solutions?

How Does Stratis Work? (Algorithms, Structure, and a Bit of Geekery)

Stratis is a user-space service (stratisd) with a command-line client (stratis-cli). It sits on top of Linux’s existing device-mapper and XFS filesystem. Here’s the basic architecture:

  • Stratisd daemon: Runs in the background, managing pools and volumes.
  • stratis-cli: The command-line tool you use to talk to stratisd.
  • Pools: Collections of one or more block devices (disks, partitions, LUNs, etc.).
  • Volumes: Thin-provisioned logical volumes inside a pool, formatted as XFS filesystems.

Stratis uses device-mapper thin provisioning for flexibility and XFS for robustness and speed. It doesn’t reinvent the wheel; it just makes the wheel easier to use.

Diagram: Stratis Architecture

+-------------------+
|   stratis-cli     |
+---------+---------+
          |
          v
+-------------------+
|    stratisd       |
+---------+---------+
          |
          v
+-------------------+
|  Device Mapper    |
+---------+---------+
          |
          v
+-------------------+
|     XFS FS        |
+-------------------+

How to Set Up Stratis: Quick and Dirty Guide

Let’s get your storage pool up and running in minutes. This works on most modern Linux distros (Fedora, CentOS, RHEL, Ubuntu with PPA, etc.).

Step 1: Install stratis-cli and stratisd

On Fedora, CentOS Stream, or RHEL:


sudo dnf install stratis-cli stratisd

On Ubuntu (with PPA):


sudo add-apt-repository ppa:stratis-storage/ppa
sudo apt update
sudo apt install stratis-cli stratisd

Step 2: Start and Enable the Stratis Daemon


sudo systemctl enable --now stratisd

Step 3: Prepare Your Disks

Identify the disks you want to use (e.g., /dev/vdb, /dev/vdc). Warning: All data on these devices will be wiped!


lsblk

Step 4: Create a Pool


sudo stratis pool create mypool /dev/vdb /dev/vdc

You can add more devices later if you need to grow the pool.

Step 5: Create a Filesystem (Volume)


sudo stratis filesystem create mypool myfs

Step 6: Mount the Filesystem


sudo mkdir /mnt/myfs
sudo mount /dev/stratis/mypool/myfs /mnt/myfs

That’s it! You now have a thin-provisioned, expandable, snapshot-able filesystem ready to use.

Step 7: (Optional) Add More Disks Later


sudo stratis pool add-data mypool /dev/vdd

Step 8: (Optional) Take a Snapshot


sudo stratis filesystem snapshot mypool myfs myfs-snap1

Real-World Examples: The Good, the Bad, and the Geeky

Scenario Stratis LVM ZFS
Easy pool creation Super easy Somewhat complex Easy, but needs ZFS modules
Adding disks on the fly Yes, one command Possible, but more steps Yes, but ZFS pools are less flexible with device removal
Snapshots Yes, fast Yes, but not as simple Yes, very advanced
Deduplication No No Yes (but RAM hungry)
Compression No (yet) No Yes
Works with Docker Yes Yes Yes (but kernel modules needed)
Kernel module required No (user-space) No Yes

Positive Case: Expanding Storage on a VPS

You’re running a VPS from here and want to add a second disk for your growing Nextcloud instance. With Stratis, you just add the new block device to your pool, and your filesystem grows. No downtime, no complex configs.

Negative Case: Need for Compression or Deduplication

If you want transparent compression or deduplication, Stratis isn’t there (yet). ZFS or Btrfs would be better, but they require more RAM and kernel modules.

Beginner Mistakes and Common Myths

  • Myth: Stratis is a filesystem.
    Reality: Stratis is a storage manager that creates XFS filesystems.
  • Mistake: Adding a device to a pool will automatically rebalance data.
    Reality: Stratis stripes new data across all devices, but existing data stays put.
  • Myth: Stratis is unstable.
    Reality: It’s stable and used in production (especially on RHEL/Fedora), but still evolving.
  • Mistake: Forgetting to mount the Stratis volume at boot.
    Tip: Add an entry to /etc/fstab using the device path or UUID.

Similar Solutions: How Does Stratis Compare?

  • LVM: Powerful, but more complex CLI. Lacks easy snapshots and thin provisioning unless you dig deep.
  • ZFS: Feature-rich (compression, dedup, checksumming), but needs kernel modules and lots of RAM.
  • Btrfs: Built-in to Linux, supports snapshots and compression, but has a reputation for instability in some use cases.
  • Traditional RAID: Hardware or mdadm RAID is robust, but not as flexible or easy to grow/resize.

Interesting Facts and Non-Standard Usage

  • Stratis is written in Rust! Modern, memory-safe, and fast.
  • Great for ephemeral cloud workloads: Quickly spin up and tear down storage pools for CI/CD pipelines or test environments.
  • Automate with Ansible or scripts: Stratis commands are script-friendly. You can automate pool creation, snapshots, and more.
  • Use for Docker or KVM storage: Create a Stratis pool and mount volumes as Docker data roots or KVM disk images for flexible, fast storage.
  • Snapshot before upgrades: Take a snapshot before a risky system update, so you can roll back if things go sideways.

New Opportunities: Automation and Scripting

Because Stratis is so simple and scriptable, it’s perfect for:

  • Automated server provisioning: Use cloud-init or Ansible to set up pools and filesystems on new VPS or dedicated servers (order here).
  • Scheduled snapshots: Cron jobs to snapshot your volumes daily or before big deployments.
  • Dynamic storage for containers: Quickly create and destroy filesystems for containerized workloads.

Statistics: Stratis Adoption and Performance

  • Included by default in Fedora and RHEL since 2019.
  • Performance is on par with LVM+XFS (since it uses the same backend), but with less admin overhead.
  • Hundreds of thousands of servers use Stratis in production, especially in enterprise Linux environments.

Conclusion: Should You Use Stratis?

If you want simple, flexible, and scriptable storage management for your cloud, VPS, Docker, or dedicated server, Stratis is an awesome choice. It’s not as feature-packed as ZFS, but it’s much easier to set up and doesn’t require kernel modules or tons of RAM. For most practical server setups—especially if you’re already using XFS—it’s a no-brainer.

  • Use Stratis if: You want quick, reliable storage pools, easy snapshots, and simple expansion.
  • Skip Stratis if: You need compression, deduplication, or advanced data integrity features (go ZFS or Btrfs).

For more info, check out the official docs: https://stratis-storage.github.io/

Ready to try? Grab a VPS or dedicated server, and give Stratis a spin. Your storage headaches might just become a thing of the past!



This article incorporates information and material from various online sources. We acknowledge and appreciate the work of all original authors, publishers, and websites. While every effort has been made to appropriately credit the source material, any unintentional oversight or omission does not constitute a copyright infringement. All trademarks, logos, and images mentioned are the property of their respective owners. If you believe that any content used in this article infringes upon your copyright, please contact us immediately for review and prompt action.

This article is intended for informational and educational purposes only and does not infringe on the rights of the copyright owners. If any copyrighted material has been used without proper credit or in violation of copyright laws, it is unintentional and we will rectify it promptly upon notification. Please note that the republishing, redistribution, or reproduction of part or all of the contents in any form is prohibited without express written permission from the author and website owner. For permissions or further inquiries, please contact us.

Leave a reply

Your email address will not be published. Required fields are marked