Quantcast
Viewing all articles
Browse latest Browse all 293210

Re: Help! WS7 disk compaction does not work....

Hi,

 

Don't worry, you got the expected results. You can compact the virtual disk but you need to perform an extra step.

 

When you delete data from a filesystem the actual data usually remains on disk, only the filesystem metadata is updated to remove things like directory entries and mark the disk block occupied by the file(s) as free. But the blocks on disk still contain the original data.

 

What compacting does is removing any blocks that contain nothing but zero's. It creates new files and copies all non zero blocks from old to new. And deleting files does not zero fill the blocks they occupied on disk.

 

So, what you need to do is fill all unused disk space with zero's. This is exactly what the vmware-tools will do when you use it to (prepare for) a shrink.

 

So you could use vmware tools to do it. Or if you don't want to install the tools do it manually.

Inside a linux guest you can use dd with /dev/zero, e.g. 'dd if=/dev/zero of=delete.me bs=64k && rm delete.me".

If you have windows guest download a copy of "sdelete" from http://technet.microsoft.com/en-us/sysinternals/bb897443. It has a 'zero free space' feature specifically meant for this kind of situation.

 

Regards, Mark,


Viewing all articles
Browse latest Browse all 293210

Trending Articles