Ross Becker
2008-Nov-07 22:05 UTC
[zfs-discuss] A couple of newbie questions about ZFS compression
I''m about to enable compression on my ZFS filesystem, as most of the data I intend to store should be highly compressible. Before I do so, I''d like to ask a couple of newbie questions.... First - if you were running a ZFS without compression, wrote some files to it, then turned compression on, will those original uncompressed files ever get compressed via some background work, or will they need to be copied in order to compress them? Second- clearly the "du" command shows post-compression size; opensolaris doesn''t have a man page for it, but I''m wondering if there''s either an option to show "original" size for du, or if there''s a suitable replacement I can use which will show me the uncompressed size of a directory full of files? (no, knowing the compression ratio of the whole filesystem and the du size isn''t suitable; I''m looking for a straight-up du substitute which would tell me original sizes") Thanks Ross -- This message posted from opensolaris.org
Ian Collins
2008-Nov-07 22:41 UTC
[zfs-discuss] A couple of newbie questions about ZFS compression
Ross Becker wrote:> I''m about to enable compression on my ZFS filesystem, as most of the data I intend to store should be highly compressible. > > Before I do so, I''d like to ask a couple of newbie questions.... > > First - if you were running a ZFS without compression, wrote some files to it, then turned compression on, will those original uncompressed files ever get compressed via some background work, or will they need to be copied in order to compress them? > >Changed filesystem compress properties only apply to new writes.> Second- clearly the "du" command shows post-compression size; opensolaris doesn''t have a man page for it, but I''m wondering if there''s either an option to show "original" size for du, or if there''s a suitable replacement I can use which will show me the uncompressed size of a directory full of files? (no, knowing the compression ratio of the whole filesystem and the du size isn''t suitable; I''m looking for a straight-up du substitute which would tell me original sizes") > >I guess the obvious question is why? ls shows the file size. -- Ian.
Ross Becker
2008-Nov-07 22:53 UTC
[zfs-discuss] A couple of newbie questions about ZFS compression
The compress on-write behavior is what I expected, but I wanted to validate that for sure. Thank you. On the 2nd question, the obvious answer is that I''m doing work where knowing how large the total file sizes tells me how much work has been completed, and I don''t have any other feedback which tells me how far along a job is. When it''s a directory of 100+ files, or a whole tree with hundreds of files, it''s not convenient to add the file sizes up to get the answer. I could write a perl script.... but it honestly should a be built-in command. -- This message posted from opensolaris.org