System Administration
Showing results for 
Search instead for 
Did you mean: 

How to check disk for I/O error

Go to solution
Frequent Advisor

How to check disk for I/O error

Hey guys how do you check a disk for I/O error

Also is there a log somewhere to check this.
Robert-Jan Goossens
Honored Contributor

Re: How to check disk for I/O error


Have a look at this document.

James R. Ferguson
Acclaimed Contributor

Re: How to check disk for I/O error


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

...This will run for quite a while depending on the disk size. You should see the same number of records in as out.

Notice the use of the raw device file to bypass the Unix buffer cache. Notice too, the use of a large blocksize to speed the process.


Suraj K Sankari
Honored Contributor

Re: How to check disk for I/O error


These docs is reffer by When_Good_Disks_Go_Bad_WP.pdf doc.

These are the methods to check the disk is bad or good

# ioscan -fCdisk
Class I H/W Path Driver S/W State H/W Type Description
disk 0 8/4.5.0 sdisk CLAIMED DEVICE SEAGATE ST34572WC
disk 1 8/4.8.0 sdisk UNCLAIMED UNKNOWN SEAGATE ST34572WC
disk 2 8/16/5.2.0 sdisk CLAIMED DEVICE TOSHIBA CD-ROM XM-5401TA

Note:Only disks in state CLAIMED are currently accessible by the system. Disks in other states such as NO_HW or disks that are completely missing from the ioscan output are suspicious.
In this example, the disk at hardware path 8/4.8.0 is not accessible.

# pvdisplay /dev/dsk/c1t2d3 | grep
"PV Status"
PV Status unavailable

Note:if the pvdisplay command is able to report a valid status (unavailable/available) for it. Otherwise, the disk is unattached

# diskinfo /dev/rdsk/c0t5d0
SCSI describe of /dev/rdsk/c0t5d0:
vendor: SEAGATE
product id: ST34572WC
type: direct access
size: 0 Kbytes
bytes per sector: 512

Note:In this example the size is 0, so the disk is malfunctioning.

# dd if=/dev/rdsk/c1t3d0 of=/dev/null bs=1024k &
dd read error: I/O error
0+0 records in 0+0 records out

Note:If the disk is functioning properly, no I/O errors are reported.

Frequent Advisor

Re: How to check disk for I/O error

Thanks All :)