1829161 Members
7465 Online
109986 Solutions
New Discussion

dd command to test disk

 
SOLVED
Go to solution
lawrenzo_1
Super Advisor

dd command to test disk

Hello,

How do you tell of there is a problem with a disk by running:

# dd if=/dev/rdsk/c4t13d0 of=/dev/null bs=512k

I have been told this will tell you if there is a problem so what output would you expect?

TY
hello
5 REPLIES 5
saju_2
Respected Contributor
Solution

Re: dd command to test disk

Mel Burslan
Honored Contributor

Re: dd command to test disk

either it will complete successfully by saying something like

xyz+w bytes in
xyz+w bytes out

which means it could successfully be read from all across the platters.

if there are some bad blocks, the program will abort abnormally giving some sort of an error message that I can not recall now. It has been ages since I have not seen one.
________________________________
UNIX because I majored in cryptology...
Joseph Loo
Honored Contributor

Re: dd command to test disk

hi,

as the others have mentioned, the records in and records out must be the same and complete successfully.

u do not have to wait for the output to be shown, by "breaking it" (ctrl+c), the output of the dd command will also be shown.

regards.
what you do not see does not mean you should not believe
lawrenzo_1
Super Advisor

Re: dd command to test disk

thanks I wasn't sure as I ran the commnad and had to do ctrl+ D to gre the output.
hello
Patrick Wallek
Honored Contributor

Re: dd command to test disk

I know you already closed this, but I had to chime in.

I would recommend using a block size larger that 512k. That is awfully small and will take a while to complete. I would go with 4096k or 8192k. The test should still accomplish the same thing, but be a bit faster.