i want to wipe all of the metadata created by my raid controller on some drives. i don't know how to do this properly, so i'm running this:
root 871 16.5 0.5 5176 1820 v3 R+ 8:20PM 15:17.97 dd if=/dev/zero of=/dev/ad10 bs=1m
root 866 16.3 0.5 5176 1820 v2 R+ 8:20PM 15:22.56 dd if=/dev/zero of=/dev/ad8 bs=1m
root 858 15.0 0.5 5176 1820 v1 R+ 8:19PM 14:34.39 dd if=/dev/zero of=/dev/ad6 bs=1m
root 875 14.4 0.5 5176 1820 v0 R+ 8:20PM 14:24.03 dd if=/dev/zero of=/dev/ad4 bs=1m
but it's taking forever (200 minutes and counting)! is there a better way?
> is there a better way?
Not if you ever want to use your drives again.
i could have tried something like `gmirror clear`, but i'm afraid it would miss the raid controller's proprietary metadata.
i'm glad i zeroed all of the drives, then.
jlr destroyed my inbox last night
meaning that i didn't properly backup your data first? or that i sent you a lot of emails?
Ah, yeah, I guess that was sort of ambiguous. I meant you sent a lot of emails :)
o/
Where is the metadata stored?
If it's at the start of the drive then it's easy, for example to clear first megabyte of ad0:
# dd if=/dev/random of=/dev/ad0 bs=1M count=1
It would seem you can use the seek= and skip= options to overwrite just a single MB at, for example, the end of the drive: (Example Assumes ad0 is 381554MB)
# dd if=/dev/random of=/dev/ad0 bs=1M count=1 skip=381553
Note that I have never used the skip= or seek= options, and I don't have a drive lying for experimentation right now ...
btw, it is usually better to use a block size equal or slightly smaller than the drive's cache (Typically 16 or 32MB nowadays).
> Where is the metadata stored?
i don't know. i would guess it's at the very end of the drive.
> count=1 skip=381553
cool, i didn't know about count or skip! i'll have to try them next time.
> if=/dev/random
if i had used /dev/random instead of /dev/zero, i would have waited for weeks.
> it is usually better to use a block size equal or slightly smaller than the drive's cache (Typically 16 or 32MB nowadays).
thanks for the info! it makes sense to me.