public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
From: Gregory Nowak <greg@romuald.net.eu.org>
To: speakup@braille.uwo.ca
Subject: zeroing out empty space on a drive
Date: Wed, 11 Jul 2007 00:58:50 -0700	[thread overview]
Message-ID: <20070711075850.GA5273@localhost.localdomain> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello all.

According to the vboxmanage reference of the virtualbox user's manual,
it is possible to compact a dynamic virtual hard drive, so that it is
only as big as the data currently stored on it. However, the manual
states that the empty space needs to be filled with zeros for this to
be effective.

Of course, when you first create a dynamic drive, it grows only as you
need it, so compacting it isn't necessary. However, if you've put a
large amount of data on the drive, and then removed that data, the
expanded space remains, so it would be nice to compact the drive.

My question is how do I zero out empty space in a gnu/linux guest? I'm
assuming I'd use dd on the raw partitions (I.E. /dev/hda1, /dev/hda2
and so on), providing it an offset I would somehow determine. The
problem I see with this is what if the file system is fragmented,
(ext3 in my case and swap), and you don't have an empty block of zeros
all at the end, especially if you've added data, removed it, and added
another set of data? Is there an easier way to do this for ext3 and
swap with e2fsprogs, or some other utility? If not, and if dd is the
only way, then could
someone please explain how to determine the offset I would need to
pass to dd, and how to make sure that data on the drive is in one
contiguous block? Thanks in advance.

Greg
 
- -- 
web site: http://www.romuald.net.eu.org
gpg public key: http://www.romuald.net.eu.org/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)

- --
Free domains: http://www.eu.org/ or mail dns-manager@EU.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGlI267s9z/XlyUyARArREAJ9Zd/cmZNLwRH9duy+juFJuJLlwlgCgtkx/
y1wWCYEXwafTsv/h73+hfPQ=
=i0nV
-----END PGP SIGNATURE-----


                 reply	other threads:[~ UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070711075850.GA5273@localhost.localdomain \
    --to=greg@romuald.net.eu.org \
    --cc=speakup@braille.uwo.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).