|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-users
Re: [Xen-users] Recovering space or "shrink" disk img?
 
James Pifer wrote:
 
That's the same thing I got before removing the 4 gb file. Should I
expect disk0 to "recover" the space automatically? VMware has a shrink
disk option, does something similar need to be done in xen?
   
 
 As previously commented, Linux doesn't recover "unused" space from a 
file.   However, if you shut down the guest then you can use "cp 
--sparse=always" to "recover" sparse blocks.  At the cost of temporarily 
allocating all the sparse blocks on the disk you can do "dd if=/dev/zero 
of=/tmp/hugefile; rm /tmp/hugefile" to make it possible to recover more 
disk space.   Overwriting blocks that are not in use and contain 
non-null bytes is possible but I don't know of an easy way to do it 
except in one or two special cases.
jch
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
 
 |   
 
 | 
    | 
  
  
    |   | 
    |