Detect secure a clean hard disk.

Andreas Schockenhoff asc at gmx.li
Mon Feb 6 17:38:01 CET 2012


Hi,

Am Sonntag, den 05.02.2012, 14:44 +0100 schrieb Michał Dwużnik:

> keep in mind that members of software RAID, lvm physical volumes and
> so on may house the data despite zeroed out first sector:
> 
>  #dd if=/dev/md0 of=file  count=1
> 1+0 records in
> 1+0 records out
> 512 bytes (512 B) copied, 0.00886503 s, 57.8 kB/s
> 
> #dd if=/dev/zero of=zero  count=1
> 1+0 records in
> 1+0 records out
> 512 bytes (512 B) copied, 6.3684e-05 s, 8.0 MB/s
> 
> #diff file zero
> #
thanks.

> md0 is a perfectly healthy device, btw...
> (LVM housing the root filesystem of the machine I used for that example...)
> 
>  cat /proc/mdstat
> Personalities : [raid1]
> md0 : active raid1 sdc4[1] sdb4[0]
>       64725760 blocks [2/2] [UU]
> 
> unused devices: <none>
> 
>  PV /dev/md0   VG fatvg    lvm2 [61.73 GiB / 17.73 GiB free]
> 
> 
> 
> Making assumptions on the basis of the first sector (which you seem to
> make due to
> 'clean the disk with dd if=/dev/zero of=/dev/sda count=1')
> would actually destroy most of machines I call 'mine', so please
> forgive me the warning.
OK seems that I have to look for a better solution.

Anyone a better idea?

regards Andreas Schockenhoff



More information about the linux-fai mailing list