Operating System - HP-UX
1834916 Members
2677 Online
110071 Solutions
New Discussion

Re: A command to format the harddisk

 
SOLVED
Go to solution
presage112
Advisor

A command to format the harddisk

Hi all

Is there any command that formats the hardisk , I tried Mediainit but it works only for the tape drive.


Any help will be appreciated.

Thanks.

OS ver HP-UX 11.0
7 REPLIES 7
Sanjay Kumar Suri
Honored Contributor

Re: A command to format the harddisk

mediainit also works disks. One need to use raw device file with the mediainit command.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
SIJU JOSE
Frequent Advisor
Solution

Re: A command to format the harddisk

Hi

You can try the following

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

or

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

Regds
Siju
Joseph Loo
Honored Contributor

Re: A command to format the harddisk

hi,

how about doing a "pvcreate -f " instead of mediainit?

regards.
what you do not see does not mean you should not believe
Naveej.K.A
Honored Contributor

Re: A command to format the harddisk

hi,

mediainit is a command which is used to initialize disk as well as a dds tape.

#mediainit /dev/rdsk/c0t4d0
should work for you
man mediainit for more details

also you could pvcreate -f /dev/rdsk/c0t4d0 the disk to wipe off the contents.

you can dd if=/dev/null of=/dev/rdsk/c0t4d0 bs=1024 to wipe the disk

with best wishes
Naveej
practice makes a man perfect!!!
Jose Mosquera
Honored Contributor

Re: A command to format the harddisk

Hi,

Maybe "mediainit" command will be useful for you, this initializes mass storage media by formatting the media (man mediainit for details).

But before use it pls check the following link.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x410d57bd90a9d611abdb0090277a778c,00.html


Rgds.
presage112
Advisor

Re: A command to format the harddisk

Thanks everybody.

this was so helpful.
Joseph Loo
Honored Contributor

Re: A command to format the harddisk

hi,

assign some points to all who help would be appreciated.

regards.
what you do not see does not mean you should not believe