Corrupt Data Block

Top  Previous  Next

This function was introduced in release 1.28.

 

This function is generally used to corrupt ECC data on a particular block in order to test proper operation of data integrity checks, error logging, and mirroring/RAID hardware and software.  Once you corrupt a block, the next read operation to that block will fail with an unrecovered read error (3/11).  The block will stay corrupted until it is read or written to.  When an application writes to that block, it will automatically be remapped by the disk drive and the error will be cleared.

 

Use this function to make sure your RAID hardware, host O/S, mirroring software, or diagnostic software reacts appropriately when you read from that block.  You may also use this command to insure that the problem is picked up by self-test programs and operating system utilities. The block number must be a numeric number ranging from 0 to the last block number on the disk.

 

Syntax

smartmon-ux -rc BLOCKNUMBER devicename

 

where

BLOCKNUMBER is a decimal number for the block number.

 

Example

smartmon-ux -rc 12345678 /dev/sg3

 

Only one block can be corrupted at a time, but this is generally not an issue since one would typically only want to corrupt one or two blocks.  The program will immediately execute and return. SANTOOLS uses both the READ LONG and WRITE LONG commands to determine the length of the ECC field for each block and to corrupt the data.