1. Linux VDO
Virtual Data Optimizer 通過數據去重、壓縮的方式來優化存儲空間。
VDO層放置在現有塊存儲設備上,例如Raid設備、本地磁盤設備。
1.1 Install
# yum -y install vdo
1.2 Create
# vdo create --name=vdo01 --device=/dev/vdb --vdoLogicalSize=5G
# vdo list
# vdostats --si
1.3 Mount
# mkfs.xfs /dev/mapper/vdo01
# mount /dev/mappler/vdo01 /mnt/vdo01
2. Stratis
本地存儲管理工具,通過Stratis可以便捷的使用Thin Provisioning、Snapshots、Pool-based的管理和監控等高級存儲功能。
Stratis 基於xfs文件系統格式。
2.1 Install
# yum install -y stratisd stratis-cli
# systemctl enable --now stratisd
2.2 Create Pool
# wipefs -a /dev/vdb // 清除磁盤簽名
# wipefs -a /dev/vdc // 清除磁盤簽名
# stratis pool create pool-1 /dev/vdb /dev/vdc
# stratis pool list
2.3 Extend Pool
# stratis pool add-data pool-1 /dev/vdd
2.4 BlockDevice
# stratis blockdev list pool
2.5 FileSystem
# 在Pool創建FileSystem,可以在一個Pool中創建多個filesystem
$ stratis filesystem create pool-1 file-1
$ stratis filesystem list
2.6 Mount FileSystem
$ mount /stratis/pool-1/file-1 /mnt/
2.7 Snapshot
# 創建Snaphost這樣做后,你可以掛載新的Snapshot,
# 它將初始包含與FileSystem相同的文件內容,
# 但它可能隨着文件系統的修改而改變。
# 無論你對Snapshot所做的任何更改都不會反映到FileSystem中,
# 除非你卸載了FileSystem並將其銷毀。
$ stratis filesystem snapshot pool-1 file-1 snapshot-1
$ mount /stratis/pool-1/snapshot-1 /mnt/