In this exercise, you will use the Stratis Storage Manager to create pools, volumes and file systems that work in cooperation.
Outcomes
You should be able to use the Stratis storage manager to combine disks into pools and create volumes and file systems, and show how file systems and volumes share pools cooperatively.
Install the Stratis storage manager on servera.
Log in to servera as the root user.
[student@workstation ~]$ssh root@servera
Install the stratisd and the stratis-cli packages on servera.
[root@servera ~]#yum install stratisd stratis-cli...output omitted...Is this ok [y/N]:y...output omitted...
Enable the stratisd service on servera to start at boot time.
[root@servera ~]#systemctl enable --now stratisdCreated symlink /etc/systemd/system/sysinit.target.wants/stratisd.service → /usr/lib/systemd/system/stratisd.service.
Use the Stratis storage manager to create a new pool with the /dev/vdb device.
Create the stratispool pool with the /dev/vdb device.
[root@servera ~]#stratis pool create stratispool /dev/vdb
Verify that the stratispool pool is now available.
[root@servera ~]#stratis pool listName Total Physical Size Total Physical Used stratispool 1 GiB 52 MiB
Add /dev/vdc as an additional device to the stratispool pool.
Add /dev/vdc as an additional device to the stratispool pool.
[root@servera ~]#stratis pool add-data stratispool /dev/vdc
Verify that /dev/vdc is part of the stratispool pool.
[root@servera ~]#stratis blockdevPool Name Device Node Physical Size State Tier stratispool /dev/vdb 1 GiB In-use Data stratispool/dev/vdc1 GiB In-use Data
Create the filesystem1 file system in the stratispool pool.
Create the filesystem1 file system in the stratispool pool.
[root@servera ~]#stratis fs create stratispool filesystem1
Verify that the filesystem1 file system is now available.
[root@servera ~]#stratis fs list stratispoolPool Name Name Used Created Device stratispool filesystem1 546 MiB Jan 23 2019 08:44 /stratis/stratispool/filesystem1
Mount the filesystem1 file system, and create a new file on it.
Create a new mount point, named /stratisvol.
[root@servera ~]#mkdir /stratisvol
Mount the filesystem1 file system into the /stratisvol directory.
[root@servera ~]#mount /stratis/stratispool/filesystem1 /stratisvol
Verify that the filesystem1 file system is now accessible.
[root@servera ~]#mount... output omitted ... /dev/mapper/stratis-1-b5ceb83a7c57488a9c02b501d1419ce4-thin-fs-333a2d9922c04ee6abebcc71bdb047b5on /stratisvol type xfs (rw,relatime,seclabel,attr2,inode64,sunit=2048,swidth=2048,noquota)
Create a new empty file named file.txt.
[root@servera ~]#touch /stratisvol/file.txt
Create a snapshot of the filesystem1 file system.
When done, remove the file you previously created.
Create a snapshot, named filesystem1-snapshot, of the filesystem1 file system.
[root@servera ~]#stratis fs snapshot stratispool filesystem1 filesystem1-snapshot
Remove the file.txt file.
[root@servera ~]#rm -f /stratisvol/file.txt
Inspect the filesystem1-snapshot snapshot you just created, and verify that the file is available.
Create a mount point named /stratisvolsnap, for the snapshot.
[root@servera ~]#mkdir /stratisvolsnap
Mount the filesystem1-snapshot snapshot in the /stratisvolsnap directory.
[root@servera ~]#mount /stratis/stratispool/filesystem1-snapshot /stratisvolsnap/
Verify that the file.txt file is available.
[root@servera ~]#ls /stratisvolsnapfile.txt
Destroy the filesystem1-snapshot snapshot.
Unmount the filesystem1-snapshot snapshot.
[root@servera ~]#umount /stratis/stratispool/filesystem1-snapshot
Destroy the filesystem1-snapshot snapshot.
[root@servera ~]#stratis filesystem destroy stratispool filesystem1-snapshot
Destroy the filesystem1 file system.
Unmount the filesystem1 file system.
[root@servera ~]#umount /stratis/stratispool/filesystem1
Destroy the filesystem1 file system.
[root@servera ~]#stratis filesystem destroy stratispool filesystem1
Destroy the stratispool pool.
When done, log out from servera.
Destroy the stratispool pool.
[root@servera ~]#stratis pool destroy stratispool
Verify that the stratispool pool is not available.
[root@servera ~]#stratis pool listName Total Physical Size Total Physical Used
Log out from servera.
[root@servera ~]#exit[student@workstation ~]$
This concludes the guided exercise.