Operating System - HP-UX
1834142 Members
2167 Online
110064 Solutions
New Discussion

Re: disk response using dd

 
SOLVED
Go to solution
Dave Chamberlin
Trusted Contributor

disk response using dd

hello,
I am adding several (refurb) disks in an SC10 enclosure. I have done no formatting on the disks, but have exercised each using the dd command (ie dd if=/dev/rdsk/cxtydz...). After running this for each disk for the same time period, the number of records in/out on one of the disks is only about 1/3 as many as any of the other disks. Does this indicate a problem with this disk?
Thanks
10 REPLIES 10
Alzhy
Honored Contributor

Re: disk response using dd

What's the complete dd syntax you used?

dd if=/dev/rdsk/cXtYdZ of=/dev/null bs=4096k

is what I usually use to test and exercise a disk.. varying block size from 4k all the ay up to 4096K (4MB).

Everytime you should get the same number of records...
Hakuna Matata.
Alzhy
Honored Contributor

Re: disk response using dd

The same number of records for each block size that is.
Hakuna Matata.
A. Clay Stephenson
Acclaimed Contributor

Re: disk response using dd

Assuming that you specified the same blocksize for all and assumming that all the disks are of equal capacity then this does sound suspicious. If the above assumptions are correct, then run your dd command again and then capture the value of ${?} IMMEDIATELY after the dd.

dd if=xxx bs=1024k of=yyy
STAT=${?}
echo "Status = ${STAT}"

If that value is non-zero then you have a problem. If the value is zero (and I suspect it is because you did not mention any stderr output) then I'll bet the vendor installed a smaller capacity drive in the module. Diskinfo should tell you.
If it ain't broke, I can fix that.
Dave Chamberlin
Trusted Contributor

Re: disk response using dd

The exact syntax was:
dd if=/dev/rdsk/c13t8d0 of=/dev/null bs=1024

The in/out records match but the total records/second is much lower on the disk in question
Alzhy
Honored Contributor

Re: disk response using dd

Okay.. but are these "refurb" disks the same (geometry/size, speed) as the others you're testing?
Hakuna Matata.
A. Clay Stephenson
Acclaimed Contributor

Re: disk response using dd

Your test was flawed because you used a very small blocksize. Differences in system load could easily distort your values when do many reads of this size. Repeat using a "good" disk and your "bad" disk with bs=64k (at least) or bs=1024k (better).

Compare the diskinfo outputs of a "good" and "bad" disk. The vendor may have switched models.
If it ain't broke, I can fix that.
Dave Chamberlin
Trusted Contributor

Re: disk response using dd

I have run diskinfo on the disks. The disk in question is an IBM, the rest are seagate/fujitsu. All report same type, size, bytes per sector. Clay - the status returned is 2 for any of the drives after stopping dd.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: disk response using dd

I should have read your posting more carefully because it appears you stopped each dd with a SIGINT; in that case a non-zero exit status is expected.

If you are going to all this trouble, I would allow each dd to complete so that all disk blocks are checked. The dd's will go much faster with a larger blocksize.

I would do this:
timex dd if=/dev/dsy/xxxxx bs=1024k of=/dev/null
STAT=${?}
echo "Status = ${STAT}"

for each drive. If you do now see failures or drive that differ significantly in i/o rates then you should ask your vendor for replacements. It's a good idea to keep a few spare drives onhand anyway.
If it ain't broke, I can fix that.
Vincent Fleming
Honored Contributor

Re: disk response using dd

You can also use the "count=" to limit the runtime of the dd command...

dd if=/dev/rdsk/c1t1d1 bs=1024k count=100 of=/dev/null

That way it'll only read 100 buffers, and produce a valid return code.
No matter where you go, there you are.
Dave Chamberlin
Trusted Contributor

Re: disk response using dd

Using a given count, this disk has twice the response time as the other disks - so I have decided to swap it out. Thanks for your comments.