RHCSA RHEL 8 – Manage Layered Storage (Stratis)

RHCSA RHEL 8 – Manage Layered Storage (Stratis)

Your support on Ko-Fi is much appreciated:
https://ko-fi.com/csg_yt

Buy CSG Merchandise:
http://tee.pub/lic/csg

More information on Sophos Home Antivirus:
http://bit.ly/SophosHP

More information about Hostinger VPS:
http://bit.ly/H-VPS

This video is based on RHEL 8.

Video to cover the section ‘Manage Layered Storage’ for the RHCSA (Red Hat Certified System Administrator).

More information on the required learning: http://bit.ly/rhcsa8

Notes from the video (also can be found on my website):
https://csg.tech.blog/2020/02/10/rhcsa-rhel-8-manage-layered-storage-stratis/

Stratis is a local management storage solution added into RHEL8. Stratis supports the following features:

Thin provisioning (allocating space but not reserving it).
Pool-based storage (multiple block devices to a single pool).
Filesystem snapshots
To install Stratis:

# dnf install stratisd stratis-cli

Check status of the daemon:

# systemctl status stratisd

Start:

# systemctl start stratisd

Enable at boot:

# systemctl enable stratisd

Then check the status of the daemon to ensure is running using the status command.

Creating a stratis pool:

Check the existing block devices (here we have already created /dev/sdb and /dev/sdc).

# lsblk

Confirm the block devices have no filesystem on them:

# blkid -p /dev/sdb

# blkid -p /dev/sdc

If have a filesystem wipe with the following:

# wipefs -a /dev/sdb

# wipefs -a /dev/sdc

Create the stratis pool:

# stratis pool create strat1 /dev/sdb /dev/sdc

Check the pool is created successfully:

# stratis pool list

Create a filesystem on the newly created pool:

# stratis fs create stratis fs1

Check the filesystem has been created successfully:

# stratis fs list strat1

You can see the block devices created:

# lsblk

Mounting the newly created filesystem:

# mount /stratis/strat1/fs1 /mnt

You can use fstab to mount permanently, you can get the UUID required from the lsblk command above. Use the instructions from previous videos.

Add a block device to a stratis pool:

# stratis pool add-data strat1 /dev/sdd

Check the stratis pool change:

# stratis pool list

Create a stratis filesystem snapshot:

# stratis fs snapshot strat1 fs1 snapshot1

Confirm the snapshot has been created:

# stratis filesystem list strat1

Revert a snapshot:

# umount /stratis/strat1/fs1

Snapshot the current filesystem state:

# stratis filesystem snapshot strat1 fs1 snapshot2

Mount the snapshot:

# mount /stratis/strat1/snapshot1

Remove a snapshot:

# umount /stratis/strat1/snapshot1

# stratis filesystem destroy strat1 snapshot1

# stratis filesystem destroy strat1 snapshot2

List the filesystem to confirm the removal:

# stratis filesystem list strat1

Remove a stratis pool:

# umount /stratis/strat1/fs1

# stratis filesystem destroy strat1 fs1

Confirm removal:

# stratis pool list

# lsblk

#rhcsa #rhel #linux

Related Post: