相关疑难解决方法(0)

如何迁移 ZFS 文件系统以使用压缩?

问题在底部。

我有几个 ZFS 文件系统我想使用 ZFS 压缩,但是由于启用压缩只会影响写入文件系统的新数据,我想编写一个可以迁移文件系统的脚本,因此所有数据都被压缩。

这是我的测试尝试

du -h /tmp/dump.txt

zfs create -p tank3/xtest1/fs
cp /tmp/dump.txt /tank3/xtest1/fs
zfs list | grep xtest

zfs create tank3/xtest2
zfs set compression=lzjb tank3/xtest2
zfs inherit compression tank3/xtest2

zfs snapshot tank3/xtest1/fs@snap
zfs send tank3/xtest1/fs@snap | zfs receive tank3/xtest2/fs
zfs get compression tank3/xtest2/fs
zfs list | grep xtest

zfs destroy -r tank3/xtest1
zfs destroy -r tank3/xtest2


echo "test 2"

zfs create tank3/xtest2
zfs set compression=lzjb tank3/xtest2
zfs list | grep xtest

cp /tmp/dump.txt /tank3/xtest2
zfs list …
Run Code Online (Sandbox Code Playgroud)

solaris zfs storage filesystems

2
推荐指数
1
解决办法
6023
查看次数

标签 统计

filesystems ×1

solaris ×1

storage ×1

zfs ×1