From owner-freebsd-chat@FreeBSD.ORG Sun Jul 8 17:58:01 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 491DA16A400 for ; Sun, 8 Jul 2007 17:58:01 +0000 (UTC) (envelope-from freebsd@bitfreak.org) Received: from mail.twinthornes.com (mail.twinthornes.com [65.75.198.147]) by mx1.freebsd.org (Postfix) with ESMTP id 2889E13C44B for ; Sun, 8 Jul 2007 17:58:00 +0000 (UTC) (envelope-from freebsd@bitfreak.org) Received: from [10.9.70.101] (pool-72-90-106-233.ptldor.fios.verizon.net [72.90.106.233]) by mail.twinthornes.com (Postfix) with ESMTP id 0E8332A9; Sun, 8 Jul 2007 10:38:37 -0700 (PDT) Message-ID: <469120C2.50205@bitfreak.org> Date: Sun, 08 Jul 2007 10:37:06 -0700 From: Darren Pilgrim User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: Michael Eubanks References: <669580.92520.qm@web58104.mail.re3.yahoo.com> In-Reply-To: <669580.92520.qm@web58104.mail.re3.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-chat@freebsd.org 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 17:58:01 -0000 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. In my experience, using dd to create images of UFS/UFS2 volumes is problematic, though I can't qualify that. It's better to use an archival program like dump or tar, IMO. That approach also gets you a restored volume with no fragmentation.