[zfs-discuss] zvol with dedupe space accounting

Ovi Chis sonekken at gmail.com
Wed Feb 24 23:19:01 EST 2016


Dedupe works by removing duplicate pointers when you have datasets with
many files. It wont shrink one 11 GB file

On Wed, Feb 24, 2016, 10:32 PM Max Levine via zfs-discuss <
zfs-discuss at list.zfsonlinux.org> wrote:

> Hi All,
>
> It looks like deduplication is not accounted for when I have a ext3 on top
> of a deduplicated zvol. I can only write as much as the size of the zvol.
> see example:
>
> $  zpool create  -O dedup=on  tank /dev/zram0
> $  zfs create  -V 10G -o volblocksize=4k tank/vol01
> $  mkfs.ext3 /dev/zvol/tank/vol01
> $  mount /dev/zvol/tank/vol01 /vol01
> $  dd if=/dev/zero of=/vol01/out bs=1G count=11
> dd: error writing /vol01/out: No space left on device
> 10+0 records in
> 9+0 records out
> 10400808960 bytes (10 GB) copied, 31.2259 s, 333 MB/s
> $  zpool list
> NAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
> tank  76.5G  58.9M  76.4G         -     0%     0%  1246.41x  ONLINE  -
> $  zfs list
> NAME         USED  AVAIL  REFER  MOUNTPOINT
> tank        10.3G  73.4G    96K  /tank
> tank/vol01  10.3G  73.6G  10.1G  -
> $  zfs get written tank/vol01
> NAME        PROPERTY  VALUE    SOURCE
> tank/vol01  written   10.1G    -
> $
>
>
> Is this expected? how to take advantage of deduplication on a zvol in this
> case?
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss at list.zfsonlinux.org
> http://list.zfsonlinux.org/cgi-bin/mailman/listinfo/zfs-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.zfsonlinux.org/pipermail/zfs-discuss/attachments/20160225/511c1ca6/attachment.html>


More information about the zfs-discuss mailing list