我正在 Debian 上使用 zol 测试重复数据删除。
在复制任何数据之前,我已在 zvol 上设置 dedup=on,然后将数据复制到已安装的卷,没有任何问题。
cp -r folder1/* folder2/
然后我在测试数据集上运行;第一组包含非常大的文件,另一组包含许多较小的文件。然而,剩余的可用空间会减少,就好像重复数据删除根本不起作用一样。然而,当我跑步时
g@d:/media$ sudo zpool status -D tank
pool: tank
state: ONLINE
scan: scrub repaired 0B in 0 days 00:07:55 with 0 errors on Mon Aug 3 15:41:41 2020
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
ata-VBOX_HARDDISK_VB9f852d8b-d6c16fc7 ONLINE 0 0 0
errors: No known data errors
dedup: DDT entries 7234835, size 306B on disk, 174B in core
bucket allocated referenced
______ ______________________________ ______________________________
refcnt blocks LSIZE PSIZE DSIZE blocks LSIZE PSIZE DSIZE
------ ------ ----- ----- ----- ------ ----- ----- -----
1 5.73M 22.9G 7.62G 7.62G 5.73M 22.9G 7.62G 7.62G
2 81.5K 326M 147M 147M 164K 656M 295M 295M
4 866K 3.38G 1.77G 1.77G 4.39M 17.6G 9.49G 9.49G
8 191K 765M 265M 265M 2.10M 8.41G 2.92G 2.92G
16 38.9K 155M 54.6M 54.6M 897K 3.50G 1.23G 1.23G
32 11.1K 44.3M 15.5M 15.5M 474K 1.85G 665M 665M
64 3.55K 14.2M 4.89M 4.89M 293K 1.15G 404M 404M
128 775 3.03M 1.07M 1.07M 119K 478M 169M 169M
256 255 1020K 319K 319K 75.7K 303M 94.6M 94.6M
512 63 252K 85.5K 85.5K 37.2K 149M 50.4M 50.4M
1K 14 56K 19K 19K 17.5K 70M 23.8M 23.8M
2K 1 4K 512B 512B 2.48K 9.92M 1.24M 1.24M
Total 6.90M 27.6G 9.86G 9.86G 14.3M 57.0G 22.9G 22.9G
似乎推断仅使用了 27.6GB。然而,在 64GB 卷中,只有 3.1GB 可用空间,应该是 30GB 左右。
这是结果zfs get all
如果有帮助的话
g@d:/media$ sudo zfs get all
NAME PROPERTY VALUE SOURCE
tank type filesystem -
tank creation Sun Aug 2 14:51 2020 -
tank used 26.1G -
tank available 48.0G -
tank referenced 24K -
tank compressratio 2.41x -
tank mounted yes -
tank quota none default
tank reservation none default
tank recordsize 128K default
tank mountpoint /tank default
tank sharenfs off default
tank checksum on default
tank compression off default
tank atime on default
tank devices on default
tank exec on default
tank setuid on default
tank readonly off default
tank zoned off default
tank snapdir hidden default
tank aclinherit restricted default
tank createtxg 1 -
tank canmount on default
tank xattr on default
tank copies 1 default
tank version 5 -
tank utf8only off -
tank normalization none -
tank casesensitivity sensitive -
tank vscan off default
tank nbmand off default
tank sharesmb off default
tank refquota none default
tank refreservation none default
tank guid 8647552976627418118 -
tank primarycache all default
tank secondarycache all default
tank usedbysnapshots 0B -
tank usedbydataset 24K -
tank usedbychildren 26.1G -
tank usedbyrefreservation 0B -
tank logbias latency default
tank objsetid 54 -
tank dedup off default
tank mlslabel none default
tank sync standard default
tank dnodesize legacy default
tank refcompressratio 1.00x -
tank written 24K -
tank logicalused 58.3G -
tank logicalreferenced 12K -
tank volmode default default
tank filesystem_limit none default
tank snapshot_limit none default
tank filesystem_count none default
tank snapshot_count none default
tank snapdev hidden default
tank acltype off default
tank context none default
tank fscontext none default
tank defcontext none default
tank rootcontext none default
tank relatime off default
tank redundant_metadata all default
tank overlay off default
tank encryption off default
tank keylocation none default
tank keyformat none default
tank pbkdf2iters 0 default
tank special_small_blocks 0 default
tank/data type volume -
tank/data creation Sun Aug 2 14:54 2020 -
tank/data used 24.0G -
tank/data available 48.0G -
tank/data referenced 24.0G -
tank/data compressratio 2.45x -
tank/data reservation none default
tank/data volsize 63.5G local
tank/data volblocksize 4K -
tank/data checksum on default
tank/data compression gzip-9 local
tank/data readonly off default
tank/data createtxg 38 -
tank/data copies 1 default
tank/data refreservation none default
tank/data guid 5739931164781187131 -
tank/data primarycache all default
tank/data secondarycache all default
tank/data usedbysnapshots 0B -
tank/data usedbydataset 24.0G -
tank/data usedbychildren 0B -
tank/data usedbyrefreservation 0B -
tank/data logbias latency default
tank/data objsetid 80 -
tank/data dedup on local
tank/data mlslabel none default
tank/data sync standard default
tank/data refcompressratio 2.45x -
tank/data written 24.0G -
tank/data logicalused 57.6G -
tank/data logicalreferenced 57.6G -
tank/data volmode default default
tank/data snapshot_limit none default
tank/data snapshot_count none default
tank/data snapdev hidden default
tank/data context none default
tank/data fscontext none default
tank/data defcontext none default
tank/data rootcontext none default
tank/data redundant_metadata all default
tank/data encryption off default
tank/data keylocation none default
tank/data keyformat none default
tank/data pbkdf2iters 0 default
我是否误解了跨单个分区的重复数据删除的概念?我知道重复数据删除是在块级别进行的,但我花了一周的时间试图理解为什么它不起作用。
谁能告诉我 zfs dedup 做错了什么?
我不确定这是否重要,但我正在使用带有 VirtualBox 的虚拟机。
我决定复制一个文件夹超出其明显的可用空间,以查看报告的可用空间是否不正确,但后来我开始得到No space left on device
.