1753864 Members
7348 Online
108809 Solutions
New Discussion юеВ

Erasing Disks HPUX 11.00

 
AIMC
Frequent Advisor

Erasing Disks HPUX 11.00

Hi,

Has anybody got a script or an easy way of overwriting the data on multiple disks attached to a 9000 server?

Aidan
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: Erasing Disks HPUX 11.00

Aidan,

An oft-asked question around here. The best way to make disds truly un-readable involves physical destruction - magnets or hammers. If your needs only involve making data hard to retrieve, then you can use dd:

dd if=/dev/zero of=/dev/rdsk/cXtXdX bs=1024k

This does a good job of overlaying the existing data structures.

Whatever you do, don't use mediainit - it tends to make the disks un-usable in the future.


Pete

Pete
Naveej.K.A
Honored Contributor

Re: Erasing Disks HPUX 11.00

Hi,

Creat a file with the raw device filenames of all disks which you want to erase, with each device file on each line

then,

for i in `cat filename`
do
dd if=/dev/zero of=$i
done

Regards,
Naveej
practice makes a man perfect!!!
Pete Randall
Outstanding Contributor

Re: Erasing Disks HPUX 11.00

Naveej,

Without a block size specification, your dd will default to 512 byte blocks and that will take days to complete! Always remember to specify a block size - 1024k is usually good.


Pete

Pete
Sudeesh
Respected Contributor

Re: Erasing Disks HPUX 11.00

Aidan,

Best way is to use:

dd if=/dev/zero of=/dev/vgxyz/rlvol1 bs=1024k

put it in a script like Naveej mentioned.


Sudeesh
The most predictable thing in life is its unpredictability
Sudeesh
Respected Contributor

Re: Erasing Disks HPUX 11.00

sorry make it


dd if=/dev/zero of=/dev/rdsk/cxtydz bs=1024k

Sudeesh
The most predictable thing in life is its unpredictability
Naveej.K.A
Honored Contributor

Re: Erasing Disks HPUX 11.00

Pete mentioned a very vital point!!!

:)
practice makes a man perfect!!!
Pete Randall
Outstanding Contributor

Re: Erasing Disks HPUX 11.00

Aidan,

I just realized you probably don't have a /dev/zero because you're still at 11.0. In that case, refer to this thread for solutions:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=13542


Pete

Pete
Hoang Chi Cong_1
Honored Contributor

Re: Erasing Disks HPUX 11.00

Command to erase a hard disk:
#dd if=/dev/zero of=/dev/rdsk/cXtXdX bs=1024k

Regard,
HoangChiCong
Looking for a special chance.......
AIMC
Frequent Advisor

Re: Erasing Disks HPUX 11.00

Thanks folks,

That should solve the problem

Aidan