Operating System - HP-UX
1833759 Members
2298 Online
110063 Solutions
New Discussion

Command for ceck bad sector

 
Diszy Galex
Occasional Contributor

Command for ceck bad sector

Dear All...

How can i know, my disk have a bad sector or not?? I use RP3440 with HP-UX version 1.

What command to sow the bad sector??

Thank' Befor
4 REPLIES 4
Torsten.
Acclaimed Contributor

Re: Command for ceck bad sector

I know there is a tool, but it is password protected.

Try to "dd" the disk, if it normal ends, there should be no problem, e.g.

# dd if=/dev/rdsk/c0t5d0 of=/dev/null bs=1024k

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
James R. Ferguson
Acclaimed Contributor

Re: Command for ceck bad sector

Hi:

# dd if=/dev/rdsk/cXtYdZ of=/dev/null bs=1024k; echo $?

...this will examine (read) the entire physical volume so depending on its size this could take considerable time. Note the use of the raw device file to bypass the LVM and buffer cache layers.

If there are no errors, the number of records in and out will be the same and the command's exit status will be zero (0).

Regards!

...JRF...
Jeeshan
Honored Contributor

Re: Command for ceck bad sector

Hi Diszy

You can use mediainit command.

There is no need to use this now a days and with modern discs and sizes it most certainly can render discs usless to hpux.
Modern discs have all there bad sectors sorted at manufacture so a mediainit should'nt be needed as it basically just initalzes the inbuilt controller self tests.
a warrior never quits
Torsten.
Acclaimed Contributor

Re: Command for ceck bad sector

But be careful - "dd" will only read, "mediainit" will overwrite everything.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!