On 11/23/11 04:58 PM, Jim Klimov wrote:
2011-11-23 7:39, Matt Breitbach wrote:
So I'm looking at files on my ZFS volume that are compressed, and I'm
wondering to myself, "self, are the values shown here the size on disk, or
are they the pre-compressed values".  Google gives me no great results on
the first few pages, so I headed here.
Alas, I can't give a good hint about VMWare - which values
it uses. But here are some numbers it might see (likely
"du" or "ls" sizes are in play):

Locally on a ZFS-enabled system you can use "ls" to normally
list your files. This would show you the logical POSIX file
size, including any referenced-but-not-allocated sparse blocks
(logical size = big, physical size = zero), etc.
Basically, this just gives a range of byte numbers that you
can address in the file, and depending on the underlying FS
all or not all of these bytes are backed by physical storage 1:1.

If you use "du" on the ZFS filesystem, you'll see the logical
storage size, which takes into account compression and sparse
bytes. So the "du" size should be not greater than "ls" size.

It can be significantly bigger:

ls -sh x
   2 x

du -sh x
   1K    x

-- Ian.
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to