On Fri, Jan 21, 2011 at 10:34 AM, Hugo Mills <hugo-l...@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.  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.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iD8DBQFNOcObIKyzvlFcI40RAodJAJ0VyXnvxNH2MxTZ08uT8WaywsA툀齂䕺
> 7MRCSpCsPWGiXeS73ItqnWA=
> =ngld
> -----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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to