目录
一、Stratis介绍
二、安装及启动服务
安装服务
# yum install stratisd stratis-cli
启动服务并服务设为开机自启动
# systemctl enable --now stratisd
三、创建资源\存储池
3.1、创建资源池(必须是未分区的磁盘)
# stratis pool create testpool /dev/vdc
testpool 为资源池名称
3.2、查看资源池
# stratis pool list
3.3、删除资源池
# stratis pool destroy testpool
3.4、查看池的后端存储
# stratis blockdev list testpool
3.5、扩展池
# stratis pool add-data testpool /dev/vdd
四、创建一个精简配置的文件系统
4.1、创建一个精简配置的文件系统
# stratis filesystem create testpool testfilesystem
testpool: 存储池名称
testfilesystem: 文件系统名称
4.2、查看存储池中的文件系统
# stratis filesystem list
4.3、查看存储池UUID
# stratis filesystem list
4.4、删除文件系统
# stratis filesystem destroy testpool testfilesystem
五、挂载
5.1、创建一个目录用于挂载
# mkdir /root/stratis
5.2、将挂载信息写入/etc/fstab 文件
# echo "UUID=1ec32cf8-91b2-49ae-a106-49395e9354ed /root/stratis xfs defaults,x-systemd.requires=stratisd.service 0 0" >> /etc/fstab
5.3、将/etc/fstab的所有内容重新加载
# mount -a
六、快照
6.1、创建快照
# stratis filesystem snapshot testpool testfilesystem testsnapshot
- testpool: 存储池名称
- testfilesystem: 文件系统名称
- testsnapshot: 快照名称
6.2、挂载快照
# mount /stratis/testpool/testsnapshot /root/snapshottest
6.3、删除快照
# stratis filesystem destroy testpool testsnapshot