Razine
Infrastructure System Engineer

How to manage local storage using stratis | RedHat

Introduction:

stratis : is a new technology started in redhat enterprise linux ( RHEL 8 ) used as a local storage-management solution for Linux. It is focused on simplicity and ease of use, and gives you access to advanced storage features.

The central concept of Stratis:

is a storage pool. This pool is created from one or more local disks or partitions, and volumes are created from the pool.

Stratis components :

  • Block devices : such as a disk or a disk partition.
  • pools : Composed of one or more block devices.
  • filesystem : pool can contain one or more file systems, which store files.

What is pools features?

  • File system snapshots
  • Thin provisioning
  • Tiering

Supported block devices in stratis :

  • LUKS : Linux Unified Key Setup
  • LVM logical volumes : provides logical volume management for the Linux kernel
  • iSCSI : you can check it here
  • HDDs and SSDs
  • NVMe devices : the newest type of hard disks it characterized by high speed in reading and writing .

How to install stratis on RedHat ?

  • open your terminal and write the command to install the two packages
sudo yum install stratisd stratis-cli -y
  • Then you need to enable the daemon of stratis stratisd
systemctl enable stratisd
  • And start the daemon
systemctl start stratisd
  • At the end you need check the status of the service before starting
systemctl status stratisd

How to use stratis and manage local storage ?

  • I will create pool with 2 disks inside it .. each disk have capacity 20 GB (not static )
stratis pool create unixcop-pool /dev/sdb /dev/sdc
  • If you need to check for any configured stratis pool .. write this command
stratis pool list
  • To add new disk on the pool write the following command
stratis pool add-data unixcop-pool /dev/sdd
  • Then you need to create filesystems on the pool to store file on it .. follow the next command to create it.
stratis filesystem create unixcop-pool unixcop-filesystem1
stratis filesystem create unixcop-pool unixcop-filesystem2
  • Now you need to test it .. follow the next steps
  1. I will make 2 directories
  2. Then mount the filesystems
mkdir /unix /cop 
mount /stratis/unixcop-pool/unixcop-filesystem1 /unix
mount /stratis/unixcop-pool/unixcop-filesystem2 /cop

How to remove filesystem or pool ?

  • To remove the filesystem from the pool .. write the following command
stratis filesystem destroy unixcop-pool unixcop-filesystem1
  • To remove pool you must remove filesystems first , then remove the pool
stratis pool destroy unixcop-pool 

Conclusion:

The article clarify the new technology of storage management technique , just you need to follow the steps to configure and manage stratis local storage pools.

for more information about stratis use the command : man stratis

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

x