All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodney Beede <mailinglist@rodneybeede.com>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Shrinking virtual disk with btrfs on it
Date: Sat, 22 Jan 2011 11:27:52 -0700	[thread overview]
Message-ID: <AANLkTimaufA8PoHhaHgJDD-O+oxxrO4tzZngkSqS=0Jw@mail.gmail.com> (raw)
In-Reply-To: <20110121173419.GA5268@carfax.org.uk>

On Fri, Jan 21, 2011 at 10:34 AM, Hugo Mills <hugo-lkml@carfax.org.uk> =
wrote:
> 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. =
=C2=A0I
>> presume it is due to free space that isn't zeroed out.
>
> =C2=A0 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=3D/dev/zero of=3D/mountpoint/foo.dat && rm /mountpoint/foo.da=
t
>
> =C2=A0 Hugo.
>
> --
> =3D=3D=3D Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.=
org.uk =3D=3D=3D
> =C2=A0PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.=
org.uk
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--- ... =C2=A0one ping(1) to rule t=
hem all, and in the ---
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 darkness bind(2) them.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iD8DBQFNOcObIKyzvlFcI40RAodJAJ0VyXnvxNH2MxTZ08uT8WaywsA=ED=88=80=E9=BD=
=82=E4=95=BA
> 7MRCSpCsPWGiXeS73ItqnWA=3D
> =3Dngld
> -----END PGP SIGNATURE-----
>
>


I tried your method, and it made things worst.  The disk just expanded
to the maximum.  I deleted the zero filled file and made sure btrfs
compress was off.  I ran the VMware disk manage tool and told it to
defragment and shrink but it didn't get any smaller.  I think btrfs
just doesn't work that way.

I also tried btrfs filesystem defragment with no luck.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-01-22 18:27 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
2011-01-22 18:27   ` Rodney Beede [this message]
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='AANLkTimaufA8PoHhaHgJDD-O+oxxrO4tzZngkSqS=0Jw@mail.gmail.com' \
    --to=mailinglist@rodneybeede.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.