[CentOS] Question about dd (fill a hard disks' unused space with blanks)

Sun Jun 7 16:34:02 UTC 2009
Rainer Duffner <rainer at ultra-secure.de>

Am 07.06.2009 um 18:22 schrieb Niki Kovacs:

> Hi,
>
> I'm currently experimenting with G4U (Ghost for Unix), a small cloning
> application sending disk images to an FTP server.
>
> The application reads the whole disk bit by bit, compresses it and  
> then
> stores it remotely. Due to this approach, it's more or less
> filesystem-independent. The drawback is that it sometimes results in
> huge image files.
>
> Now I'm currently following a hint which suggests to fill the disks'
> unused space with zero bits. Here's the command for that:
>
> # dd if=/dev/zero of=/0bits bs=20M
> # rm /0bits



This will create a file that fills up the root-partition.
If you have multiple partitions beyond that, it's not of much use.
Ideally, the zero'ing of the disk should take place before the OS is  
installed, via a boot-cd and using dd with the disk-device itself

All this made some sense when disks didn't come in sizes of 250GB  
upwards...
If you get 20MB/s from your dd(1), it would take 1000 seconds to fill  
20 GB...





Rainer