On Mon, Jan 25, 2010 at 2:32 AM, Kjetil Torgrim Homme
<kjeti...@linpro.no> wrote:
> Mike Gerdts <mger...@gmail.com> writes:
>
>> John Hoogerdijk wrote:
>>> Is there a way to zero out unused blocks in a pool?  I'm looking for
>>> ways to shrink the size of an opensolaris virtualbox VM and using the
>>> compact subcommand will remove zero'd sectors.
>>
>> I've long suspected that you should be able to just use mkfile or "dd
>> if=/dev/zero ..." to create a file that consumes most of the free
>> space then delete that file.  Certainly it is not an ideal solution,
>> but seems quite likely to be effective.
>
> you'll need to (temporarily) enable compression for this to have an
> effect, AFAIK.
>
> (dedup will obviously work, too, if you dare try it.)

You are missing the point.  Compression and dedup will make it so that
the blocks in the devices are not overwritten with zeroes.  The goal
is to overwrite the blocks so that a back-end storage device or
back-end virtualization platform can recognize that the blocks are not
in use and as such can reclaim the space.

-- 
Mike Gerdts
http://mgerdts.blogspot.com/
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to