From owner-freebsd-chat@FreeBSD.ORG Sun Jul 8 18:11:37 2007 Return-Path: X-Original-To: freebsd-chat@freebsd.org Delivered-To: freebsd-chat@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7261716A46D for ; Sun, 8 Jul 2007 18:11:37 +0000 (UTC) (envelope-from mse0206@yahoo.com) Received: from web58108.mail.re3.yahoo.com (web58108.mail.re3.yahoo.com [68.142.236.131]) by mx1.freebsd.org (Postfix) with SMTP id 275EE13C4BB for ; Sun, 8 Jul 2007 18:11:37 +0000 (UTC) (envelope-from mse0206@yahoo.com) Received: (qmail 7919 invoked by uid 60001); 8 Jul 2007 18:11:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=1G0xXaZJQiFnCMAsch2Wsl+DegtH7vDDT5m3Y/Ad681oC2vlH25xq9vm4uRhl7oYlAZzrdd5bskh5l6qSi/lhbzFX0E6vEVvS0cxEpZOO6jlV1dYaM9+S9K6//ur92T88NnMH/2ko+1/qFLzAgdEUuBEsSHOCBfvxePZ/H3AuSo=; X-YMail-OSG: vyM3N3gVM1ledh5RU1eyrLbgLTd7vuQURUdR4ClOhupDVBLEAQQd2NWYID1w9eR_rJDhziQAglIb8KK5fDvm0.vftFjBKW7fgZH. Received: from [71.93.15.161] by web58108.mail.re3.yahoo.com via HTTP; Sun, 08 Jul 2007 11:11:36 PDT Date: Sun, 8 Jul 2007 11:11:36 -0700 (PDT) From: Michael Eubanks To: freebsd-chat@freebsd.org In-Reply-To: <20070708112413.GA27077@psconsult.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <452829.7742.qm@web58108.mail.re3.yahoo.com> Subject: Re: compressed HDD image using dd...clearing unused blocks X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2007 18:11:37 -0000 --- Paul Schenkeveld 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