In Solaris 11, in a pool named
mypool I activated deduplication with
zfs set dedup=on mypool
Then I created two 100 MB file:
file1 and its copy
file1copy. Only their names are different: their contents is the same.
The mountpoint of
/mypool. If I copy both
/mypool, the output of
zpool list mypool
DEDUP ratio of barely
Then, following this guide I created a filesystem with
zfs create -o dedup=on -o mypool/archive
and then two users' filesystems
mypool/archive/b which inherited the deduplication from the parent filesystem.
If now I copy
mypool/archive/b there is still a
DEDUP ratio of
1.34x. It becomes
2 only if I put the same file, say
file1, into both
Can a simple name difference strongly tear down deduplication? Shouldn't deduplication act at block level?
1) Output of
zdb -S mypool
Simulated DDT histogram: bucket allocated referenced ______ ______________________________ ______________________________ refcnt blocks LSIZE PSIZE DSIZE blocks LSIZE PSIZE DSIZE ------ ------ ----- ----- ----- ------ ----- ----- ----- 1 1.48K 189M 189M 189M 1.48K 189M 189M 189M 2 800 100M 100M 99.9M 1.56K 200M 200M 200M Total 2.26K 289M 289M 288M 3.04K 389M 389M 388M dedup = 1.35, compress = 1.00, copies = 1.00, dedup * compress / copies = 1.35
2) Output of
zdb -b mypool
Traversing all blocks to verify nothing leaked ... No leaks (block sum matches space maps exactly) bp count: 3679 bp logical: 410970112 avg: 111707 bp physical: 408433664 avg: 111017 compression: 1.01 bp allocated: 615948288 avg: 167422 compression: 0.67 bp deduped: 157286400 ref>1: 800 deduplication: 1.26 SPA allocated: 458661888 used: 76.47%
mypool/archive/b folders there was also another file.