1753637 Members
5862 Online
108798 Solutions
New Discussion юеВ

Re: Wipe disk drives.

 
SOLVED
Go to solution
Jeffrey F. Goldsmith
Super Advisor

Wipe disk drives.

I am going to be retiring my D380 server within the next couple of weeks and wanted to know if there was any procedure to wipe the hard drives. At this point I donтАЩt think that there is any useful information on the hard drives but I want to ensure that there isnтАЩt anything on them before they leave our office.

Thanks for the help.

18 REPLIES 18
Dave La Mar
Honored Contributor

Re: Wipe disk drives.

Jeff -
We just went through that with an XP512 and dd was the preference. You will find many posts supplementing this and other ways.
It just seemed to be the best fit for us though it was time consuming due to the number of disks involved.
For you, it would be a small task.

Best of luck.

Regards,

-dl
"I'm not dumb. I just have a command of thoroughly useless information."
James R. Ferguson
Acclaimed Contributor

Re: Wipe disk drives.

Hi Jeffrey:

One solution is to write zeros or some random pattern at least once over the disk. This is a "reasonable" destruction for most.

# dd if=/dev/zeros of=/dev/rdsk/cXtYdZ bs=1024k

or:

# dd if=/dev/urandom of=dev/rdsk/CxtYdZ bs=1024k

Note the use of the raw disk device to circumvent the LVM layer. Note, too, the use of a large blocksize for fast I/O.

Regards!

...JRF...
Jeffrey F. Goldsmith
Super Advisor

Re: Wipe disk drives.

I tried to do the dd command to clear my drives but it didnt seem to work. What am I doing wrong? Here is what happened.

root: / ==> dd if=/dev/zeros of=/dev/rdsk/c6t3d0 bs=1024k
/dev/zeros: No such file or directory
dd: cannot open /dev/zeros
root: / ==> dd if=/dev/urandom of=/dev/rdsk/c6t3d0 bs=1024k
/dev/urandom: No such file or directory
dd: cannot open /dev/urandom

Do I need to create a file called "zeros" and "urandom"?

Thanks.
Kent Ostby
Honored Contributor

Re: Wipe disk drives.

you have to configure in the "rng" driver to the kernel and create device files that look like this:

cr--r--r-- 1 bin bin 62 0x000000 May 10 18:09 /dev/random
cr--r--r-- 1 bin bin 62 0x000001 May 10 18:09 /dev/urandom
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Kent Ostby
Honored Contributor

Re: Wipe disk drives.

To get /dev/zero, you would create the device file:

mknod /dev/zero c 3 0x000004

I believe it's /dev/zero not /dev/zeros.

"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
baiju_3
Esteemed Contributor

Re: Wipe disk drives.

As Kent told it is /dev/zero .

thx,
bl.
Good things Just Got better (Plz,not stolen from advertisement -:) )
Jeffrey F. Goldsmith
Super Advisor

Re: Wipe disk drives.

I found the /dev/zero and started with the last hard drive. Do you know how long it takes to perform this operation? I have 21 external hard drives and they are only 4GB each.

Thanks
James R. Ferguson
Acclaimed Contributor

Re: Wipe disk drives.

Hi Jeffrey:

Sorry, Kent is correct, the device file is '/dev/zero' without the "s" I inadvertantly added.

You don't say what release you are running.

To see hwat minor devices you have, do:

# lssf /dev/* 2> /dev/null|grep "mm"

If you are running 10.20, you will need to do:

# mknod /dev/zero c 3 0x000003

On 11.0, use:

# mknod /dev/zero c 3 0x000004

You should have /dev/zero on 11.11 and later.

Regards!

...JRF...
baiju_3
Esteemed Contributor

Re: Wipe disk drives.

No need of filling your entire disk with zeros.

Do a pvcreate -f /dev/rdsk/c?t?d? ,

Do this using a shell script , this will be much faster than writing zeros .


Thanks,
Bl.
Good things Just Got better (Plz,not stolen from advertisement -:) )