linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hugo Mills <hugo-lkml@carfax.org.uk>
To: Rodney Beede <mailinglist@rodneybeede.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Shrinking virtual disk with btrfs on it
Date: Fri, 21 Jan 2011 17:34:19 +0000	[thread overview]
Message-ID: <20110121173419.GA5268@carfax.org.uk> (raw)
In-Reply-To: <AANLkTimVGfP0UFgkTEtrqrc8RoPPoqgwu=x--KHa3Y9j@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 823 bytes --]

On Fri, Jan 21, 2011 at 10:20:34AM -0700, Rodney Beede wrote:
> Any tools to go about zeroing about the free space on a btrfs file
> system so I can shrink the VMware vmdk virtual disk?
> 
> I ran the VMware command, but the dynamic disk is still really big.  I
> presume it is due to free space that isn't zeroed out.

   One solution I've used before is to write a single very large file
full of zeroes, filling the filesystem, then delete it.

$ dd if=/dev/zero of=/mountpoint/foo.dat && rm /mountpoint/foo.dat

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
          --- ...  one ping(1) to rule them all, and in the ---          
                         darkness bind(2) them.                          

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

  reply	other threads:[~2011-01-21 17:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21 17:20 Shrinking virtual disk with btrfs on it Rodney Beede
2011-01-21 17:34 ` Hugo Mills [this message]
2011-01-22 18:27   ` Rodney Beede
2011-01-21 19:43 ` David Pottage
2011-01-22  8:28   ` Tomasz Torcz

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=20110121173419.GA5268@carfax.org.uk \
    --to=hugo-lkml@carfax.org.uk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mailinglist@rodneybeede.com \
    /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 NNTP newsgroup(s).