Subject: Re: Zeroing unused FFS blocks
To: Daniel Carosone <dan@geek.com.au>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: port-xen
Date: 01/25/2008 21:12:09
On Sat, 26 Jan 2008 08:09:17 +1100
Daniel Carosone <dan@geek.com.au> wrote:
> On Fri, Jan 25, 2008 at 01:08:19PM +0000, Steven M. Bellovin wrote:
> > The easiest thing is to mount the file and copy /dev/zero to some
> > filename. When the disk fills up, delete the file...
>
> What I do is rm the file as soon as it's created and dd is running;
> that way, as soon as dd gets ENOSPC and quits, the file is removed and
> the space is returned automatically.
>
Good idea. One more suggestion: run the dd as root, so that you can go
above the 100% mark.
--Steve Bellovin, http://www.cs.columbia.edu/~smb