|
Description
|
While doing some driver development work, I decided to use format -> analyze -> compare to test the driver in the expectation it would write, read, then compare and report any mismatch.
The compare starts and both the format command and iostat show disk activity (iostat shows reads and writes). I decided to disconnect / power off the disk (to test driver hot plugging) and both commands stop outputting data (because the disk has been turned off).
At this point the driver actually has the paths (via mpxio) temporarily disabled while a timeout mechanism occurs.
After the timeout mechanism has expired (i.e. Solaris has decided the disk has really gone), the format command start displaying block numbers and acts as if it is working again!
iostat shows that write commands are being sent to the device, but there is no actual I/O happening:
extended device statistics
r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device
0.0 1189.4 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c0tATASEAGATEST37500NSSUN750G0737A27GCX5QD27GCXd0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c0tATASEAGATEST37500NSSUN750G0737A27GCX5QD27GCXd0.t500163600002d351:4
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c0tATASEAGATEST37500NSSUN750G0737A27GCX5QD27GCXd0.t500163600002d351:4.mpt0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c0tATASEAGATEST37500NSSUN750G0737A27GCX5QD27GCXd0.t500163600002d3d1:4
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c0tATASEAGATEST37500NSSUN750G0737A27GCX5QD27GCXd0.t500163600002d3d1:4.mpt1
A truss of the format command reveals endless:
100712/1: write(1, " 2 3 0 5 0 4 7 7 8".., 15) = 15
100712/1: ioctl(3, 0x04C9, 0x08047A3C) Err#5 EIO
100712/1: write(1, " 2 3 0 5 0 4 9 0 4".., 15) = 15
100712/1: ioctl(3, 0x04C9, 0x08047A3C) Err#5 EIO
100712/1: write(1, " 2 3 0 5 0 5 0 3 0".., 15) = 15
100712/1: ioctl(3, 0x04C9, 0x08047A3C) Err#5 EIO
100712/1: write(1, " 2 3 0 5 0 5 1 5 6".., 15) = 15
100712/1: ioctl(3, 0x04C9, 0x08047A3C) Err#5 EIO
100712/1: write(1, " 2 3 0 5 0 5 2 8 2".., 15) = 15
100712/1: ioctl(3, 0x04C9, 0x08047A3C) Err#5 EIO
100712/1: write(1, " 2 3 0 5 0 5 4 0 8".., 15) = 15
100712/1: ioctl(3, 0x04C9, 0x08047A3C) Err#5 EIO
100712/1: write(1, " 2 3 0 5 0 5 5 3 4".., 15) = 15
100712/1: ioctl(3, 0x04C9, 0x08047A3C) Err#5 EIO
100712/1: write(1, " 2 3 0 5 0 5 6 6 0".., 15) = 15
100712/1: ioctl(3, 0x04C9, 0x08047A3C) Err#5 EIO
100712/1: write(1, " 2 3 0 5 0 5 7 8 6".., 15) = 15
100712/1: ioctl(3, 0x04C9, 0x08047A3C) Err#5 EIO
i.e. the uscsi ioctl is failing with EIO, but format ignores the return code and thinks that everything is ok!
For viewers at home, this is bad!
|