Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Aug 2012 09:54:52 -0700
From:      Steven Schlansker <stevenschlansker@gmail.com>
To:        Olivier Smedts <olivier@gid0.org>
Cc:        freebsd-fs@freebsd.org, Petri Helenius <petri@helenius.fi>
Subject:   Re: zero deleted blocks
Message-ID:  <F1CF0B4C-275D-44DF-9B73-323A55B38F30@gmail.com>
In-Reply-To: <CABzXLYN%2BYPeuf_-kC1UHPQRVWy-98OQs7M39EGfiyCaOj7fgQw@mail.gmail.com>
References:  <7BDA02A3-99ED-4F67-9B2D-5AAF1523642E@helenius.fi> <CABzXLYN%2BYPeuf_-kC1UHPQRVWy-98OQs7M39EGfiyCaOj7fgQw@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail


On Aug 13, 2012, at 2:27 AM, Olivier Smedts <olivier@gid0.org> wrote:

> 2012/8/13 Petri Helenius <petri@helenius.fi>:
>> 
>> Hi,
>> 
>> Is it possible to have ZFS or UFS to zero out the deallocated blocks to facilitate VM disk compaction?
>> 
>> Pete
> 
> Did you try a classic "dd if=/dev/zero of=a-file-on-the-pool" ? This
> won't give good results if you do this on a filesystem with
> compression enabled.

ZFS uses copy on write (http://en.wikipedia.org/wiki/ZFS#Copy-on-write_transactional_model) so overwriting with zeroes will actually allocate new space to hold all the zeroed data and leave the old data mostly untouched.



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F1CF0B4C-275D-44DF-9B73-323A55B38F30>