-   Linux - Newbie (
-   -   Writing zeroes to disk before using it? (

djspits 11-18-2010 12:01 PM

Writing zeroes to disk before using it?
I'm writing a script that among other things partitions and formats disks using SW RAID and LVM.

I've read somewhere that for older versions of Linux it was a good idea to use the dd command to zero the first couple of blocks od a device before partitioning it (or formatting it?)

Is this practice still recommended? To what end?

Looking forward to your reply.

macemoneta 11-18-2010 12:30 PM

It has nothing to do with older versions of Linux - the same is true of Windows and Mac OSX. When reusing drives you want to start fresh, which means removing the MBR, partition table, LVM and RAID areas on the drive. These can confuse any OS about the state of the drive, so clearing them insures that there's nothing left that will trigger erroneous behavior.

All times are GMT -5. The time now is 01:00 PM.