LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Writing zeroes to disk before using it? (https://www.linuxquestions.org/questions/linux-newbie-8/writing-zeroes-to-disk-before-using-it-845112/)

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.
DJ

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.