[plug] Zeroing blocks on ext2/3

Mike Holland myk at westnet.com.au
Wed Oct 29 22:10:09 WST 2003


On Wed, 29 Oct 2003, Brad Campbell wrote:

> Does anyone have any leads on how to zero unused blocks on an ext2 
> filesystem?

Well, you could use a fancy ext2-aware utility to locate free blocks.
OR:(as root) 
$ mount -o loop <image> /t ; cp /dev/zero /t/tmp ; rm /t/tmp ; umount /t

Maybe a pause before the 'rm', in case the kernel optimises away some
pending writes. (possible??)
 
I love an easy answer.

-- 

_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list