Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Jul 2007 11:11:36 -0700 (PDT)
From:      Michael Eubanks <mse0206@yahoo.com>
To:        freebsd-chat@freebsd.org
Subject:   Re: compressed HDD image using dd...clearing unused blocks
Message-ID:  <452829.7742.qm@web58108.mail.re3.yahoo.com>
In-Reply-To: <20070708112413.GA27077@psconsult.nl>

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

--- Paul Schenkeveld <fb-chat@psconsult.nl> wrote:

> On Sat, Jul 07, 2007 at 10:28:01PM -0700, Michael
> Eubanks wrote:
> > Hello all,
> > 
> > I am updating a system that has been around for
> some
> > time now.  I would like to make a compressed disk
> > image after the final setup is complete, although,
> I'm
> > guessing that the unused blocks will not allow me
> to
> > compress the image as well as I could with a
> > previously clean disk (considering the disk has
> been
> > in use for some time now).  Is there a way to do
> this
> > - zero out unused blocks to optimize compression? 
> I
> > generally do this with Windows machines using the
> > cipher command (killing cipher  after it has
> finished
> > writing zeroes).  After running cipher I use dd to
> > create a compressed HDD image for later use.  I'd
> like
> > to be able to do the same with FreeBSD.
> 
> What about:
> 
>   # dd < /dev/zero > BIG_EMPTY_FILE bs=128k
>   # rm BIG_EMPTY_FILE
> 
> Comes close to what you want, only a couple of
> indirect blocks are
> not zeroed this way but the majority of unused
> blocks will be.
> 

...snip...

I'll give it a shot.  That is a great idea.  I'm
wondering, though, what happens when the filesystem is
filled?  In the past, the system became unstable when
the filesystem was full.  I'm guessing that's why a
blocksize of 128k bytes was used - all blocks but the
last (<128k) will be filled?  Is that a correct
assumption?  What if I just bumped that number up to
4m or something to speed things up?


-Michael S. Eubanks
 mse0206@yahoo.com



       
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?452829.7742.qm>