On Fri, Jan 21, 2011 at 10:34 AM, Hugo Mills <hugo-lkml@xxxxxxxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
