|
|
Exercise 03 : Managing Stratis Volumes
You need one dedicated disk with a size of 5 GiB to perform the steps in this exercise. In this exercise, the disk name /dev/sdd is used as an example. Replace this name with the disk device name that is presented on your hardware.
- Type yum install stratisd stratis-cli to install all the required packages.
- Type systemctl enable --now stratisd to enable the Stratis daemon.
- Type stratis pool create mypool /dev/sdd to add the entire disk /dev/sdd to the storage pool.
- Type stratis pool list to verify successful creation of the pool.
- Type stratis fs create mypool stratis1 to create the first Stratis file system. Note that you don’t have to specify a file system size.
- Type stratis fs list to verify the creation of the file system.
- Type mkdir /stratis1 to create a mount point for the Stratis file system.
- Type blkid to find the Stratis volume UUID.
- Add the following line to /etc/fstab to enable the volume to be mounted automatically. Make sure to use the UUID name that is used on your system.
Click here to view code image
UUID=xxx /stratis1. xfs. defaults,x-systemd.requires=stratisd.
service 0 0
- Type mount -a to mount the Stratis volume. Use the mount command to verify this worked successfully.
- Type cp /etc/[a-f]* /stratis1 to copy some files to the Stratis volume.
- Type stratis filesystem snapshot mypool stratis1 stratis1-snap to create a snapshot of the volume you just created. Note that this command may take up to a minute to complete.
- Type stratis filesystem list to get statistics about current file system usage.
- Type rm -f /stratis1/a* to remove all files that have a name starting with a.
- Type mount /dev/stratis/mypool/stratis1-snap /mnt and verify that the files whose names start with a are still available in the /mnt directory.
- Reboot your server. After reboot, verify that the Stratis volume is still automatically mounted.
+ Correction
|
|
|