1747984 Members
4730 Online
108756 Solutions
New Discussion юеВ

disk clearing problems

 

disk clearing problems

I wrote an Xwindow program that uses the UNIX command "dd if=file of=/dev/rdsk/c0txd0 bs=1024k", where x=1 for the system disk, x=2 for the archive disk, and "file" contains all 1's, all 0's, or alternating 1's and 0's (depending on the pass the program is on) The program does 7 passes, writing all 1's, then all zeros, and repeating this 2 more times, with a final pass of alternating 1's and 0's. Each pass consists of 4096 calls to the dd command, since we are using 4Gb disks. This works fine on the archive disk, but when I try and run it on itself (the system disk) it appears to be working ok but when I do a "xd" on the disk it appears that there is still alot of garbage still on the disk. I would greatly appreciate it if anybody could tell me what is going on and what, if anything can be done to fix this problem, or if there are better ways to do what I'm trying to accomplish.

Greg
qwerty uiop
2 REPLIES 2
support_5
Super Advisor

Re: disk clearing problems

Hi,

I don't know what your problem was, but I assume you fixed it.

For those reading this, there is a good discussion (although somewhat disjointed) at
http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x24b53a7b3682d611abdb0090277a778c%2C00.html&admit=716493758+1074477294344+28353475

Basically, what I did was (for HP-UX 11.00):
mknod /dev/zero c 3 4
chown bin:bin /dev/zero
chmod 666 /dev/zero
dd of=/dev/rdsk/c1t1d0 bs=1024k < /dev/zero

This wiped 100 luns (some 7GB, others 14 GB) residing on an XP256 in about 10 hours, which is pretty quick for a dd command. Note, must use rdsk, must use a large block size, and must redirect /dev/zero to the device, don't 'cat' it, and don't if='s it.

If you want alternating 1' and zero's, read the above link, or search for it on the forums, as there have been good discussions about this previously.

Cheers.

- Andrew Gray

Mic V.
Esteemed Contributor

Re: disk clearing problems

Sorry if I'm being dense. It sounds like
in addition to running it on some non-boot
disks, you're also running it on an active
boot disk. AFAIK you would not be able to
truly erase this disk because parts of it are
in use (or so it seems). Perhaps someone
can shed more light.

But my suggestion for "fixing" is to make it
a non-boot disk (boot from a CD that has
your erasing program, move it to another
system, etc) and run the erasing program on
it.

HTH.
Mic
What kind of a name is 'Wolverine'?