Thread (5 messages) 5 messages, 4 authors, 2011-01-22

Re: Shrinking virtual disk with btrfs on it

From: Hugo Mills <hidden>
Date: 2011-01-21 17:34:19

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.                          

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help