On Sat, Aug 14, 2010 at 6:32 AM, Edward Ned Harvey <sh...@nedharvey.com> wrote: > I'm confused. I have compression enabled on a ZFS filesystem, which > contains for all intents and purposes, just a single 20G file, and I see ... > > # ls -lh somefile > > -rw------- 1 root root 20G Aug 13 17:41 somefile > > > # du -h somefile > > 5.6G somefile > > (Sounds like approx 25-30% of the original size to me...) > > # zfs get compressratio mypool/myzfs > > NAME PROPERTY VALUE SOURCE > > mypool/myzfs compressratio 1.28x - > > > > # zfs list | grep myzfs > > mypool/myzfs 5.65G 3.80T 5.65G > /mypool/myzfs
The compressratio shows you how much *real* data was compressed. The file in question, however, can be sparse file and have its size vastly different from what du says, even without compression. -- Regards, Cyril _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss