Operating System - HP-UX
1833873 Members
2237 Online
110063 Solutions
New Discussion

Re: how to clear the content of a used harddisk?

 
Merlin M.
Occasional Contributor

how to clear the content of a used harddisk?

I want to clear all information of a harddisk which was used.
how to use the command 'dd' to clear the content?

TIA.
self-promoting
4 REPLIES 4
Kenneth_19
Trusted Contributor

Re: how to clear the content of a used harddisk?

Is 'dd' a must or other options is appreciated?

What I can think of is the 'pvcreate' command:

pvcreate -f /dev/rdsk/cxtydz (change to your raw device)

Regards,
Kenneth
Always take care of your dearest before it is too late
Michael Tully
Honored Contributor

Re: how to clear the content of a used harddisk?

Hi,

This depend on what you wish to use the disk for. If you are re-using it for LVM, the method suggestion for 'pvcreate' will be fine. If you just wish to flatten the disk before throwing it away, then the use of 'mediainit' is the way to go.
There are 'man' pages for both of these commands.

Cheers
Michael

Anyone for a Mutiny ?
Michael Tully
Honored Contributor

Re: how to clear the content of a used harddisk?

Hi (again)

I neglected to mention that 'dd' can also be used, and it fine and much faster than using 'mediainit'

# dd if=/dev/zero of=dev/rdsk/cxtydz bs=64k

Substitute your device where cxtydz

Michael
Anyone for a Mutiny ?
T G Manikandan
Honored Contributor