IBM Storwize Media Error and Bad Block Explanation
When a storage system cannot successfully read a block, it returns a media error response to the host. Storwize® V7000 Unified follows this behavior in its responses to host reads.
The provided volume virtualization extends the time taken to return a media error to the host. Due to this difference from non-virtualized systems, Storwize V7000 Unified uses the term bad block instead of media error.
Storwize V7000 Unified allocates volumes from extents on managed disks (MDisk). MDisk can be a volume on an external storage controller or a RAID array created from internal drives. In either case, depending on the RAID level used, protection is typically provided for read errors on a single drive. However, if multiple drives have errors, or if a drive is rebuilding or offline due to other issues, a media error may still occur on a read request.
Storwize V7000 Unified provides migration tools to move volumes from one set of underlying physical storage to another, or to copy volumes using FlashCopy, Metro Mirror, or Global Mirror. In all these cases, when reading logical block addresses on the source volume, the migrated or copied volume will return a media error to the host. The system maintains a bad block table to record where logical block addresses that cannot be read are located. These tables are associated with the MDisk providing storage for the volume.
The dumpmdiskbadblocks command and the dumpallmdiskbadblocks command can be used to query the location of bad blocks.
Important: The dumpmdiskbadblocks command outputs only virtual media errors that have been created, not a list of actual media errors on the MDisk or drive.
Tables recording the locations of bad blocks may become full. The table can fill up on an MDisk or across the entire system. If the table fills up, the migration or copy operation that creates a bad block will fail because an exact image of the source volume cannot be created.
The system generates alerts in the event log for the following conditions
When it detects a media error and creates a bad block
When the bad block table becomes full
Table 1 lists the bad block error codes.
Table 1. Bad Block Errors
Error Code
Description
1840 Managed disk has bad blocks. On an external controller, this can only be a replicated media error.
1226 System failed to create a bad block because the MDisk already has the maximum allowed number of bad blocks.
1225 System failed to create a bad block because the system already has the maximum allowed number of bad blocks.
The recommended actions for these alerts will guide you to correct the situation.
Clear bad blocks by deallocating volume extents, deleting the volume, or issuing write I/O to the block. It is good practice to correct bad blocks as soon as they are detected. This prevents bad blocks from propagating during volume replication or migration. However, bad blocks may reside on parts of a volume not used by the application. For example, they could be part of a database that has not yet been initialized. When the application writes data to these areas, the bad blocks will be corrected. Before correction occurs, bad block records will continue to consume available bad block space.