Storage Management (stratis)

Skill Level: Intermediate

1. Overview

These exercises build upon the exercises performed in the fundamental storage management unit. It is necessary to complete those prior to attempting this unit.

2. Getting Started

For these exercises, you will be using the host node2 as user root.

From host bastion, ssh to node2.

ssh node2

Use sudo to elevate your privileges.

[[ "$UID" == 0 ]] || sudo -i

Verify that you are on the right host for these exercises.

workshop-stratis-checkhost.sh

You are now ready to proceed with these exercises.

3. Core Concepts

In this unit you will be exposed to some more advanced concepts for storage management including:

  • how to grow an active storage pool, and

  • how to add a cache device

Again, please be sure to have completed the fundamental exercises first.

4. Grow Storage Pool

From our earlier exercise there are 2 disks in the Stratis pool:

stratis blockdev
Pool Name    Device Node    Physical Size   Tier
summitpool   /dev/vdb                4 GiB   Data
summitpool   /dev/vdc                4 GiB   Data

Stratis also makes it easy to add space to a pool. Suppose the “summitfs” filesystem is growing close to the physical space in “summitpool”. Adding an additional disk/block device is done using:

stratis pool add-data summitpool /dev/vdd
stratis blockdev
Pool Name    Device Node    Physical Size   Tier
summitpool   /dev/vdb                4 GiB   Data
summitpool   /dev/vdc                4 GiB   Data
summitpool   /dev/vdd                4 GiB   Data

Verify that the pool shows the additional space, and that the amount used is now in a safe range.

stratis pool
Name                  Total / Used / Free    Properties                                   UUID   Alerts
summitpool   12 GiB / 538 MiB / 11.47 GiB   ~Ca,~Cr, Op   e7006323-5c8a-4ab8-b5f0-a693c6fb5b81

5. Add Cache Device

Stratis also makes it easy to add cache devices. For example, say the filesystem we just created runs into some I/O performance issues. You bought an NVME or SSD (solid state disk) and need to configure it into the system to act as a high speed cache. Use the following commands to add the drive /dev/vde and check its status:

stratis pool init-cache summitpool  /dev/vde
stratis blockdev
Pool Name    Device Node  Physical Size    Tier   UUID
summitpool   /dev/vdb              4 GiB    DATA   0231506a-5caa-49e1-b650-5a5bed250fa5
summitpool   /dev/vdc              4 GiB    DATA   d9ae78ad-037e-44f9-95a2-9c662573c087
summitpool   /dev/vdd              4 GiB    DATA   fe35bf55-2803-4aba-bab9-1985a6cd486e
summitpool   /dev/vde              4 GiB   CACHE   50feb9fe-7f35-4d83-ba8a-0fc73332823a

6. Conclusion

This concludes the exercises related to stratis.

Time to finish this unit and return the shell to its home position.

workshop-finish-exercise.sh

7. Additional Resources

Red Hat Documentation

This lab does not get into more advanced topics like encryption or snapshots. For more information on these and more details on Stratis in general, see the official Red Hat documentation here:

End of Unit