Navigation:  Screen shots and commands >

Repair Widget

Print this Topic Previous pageReturn to chapter overviewNext page

RepairW

Command-Line Invocation and Application Notes

This function is applicable to disks that use the SCSI protocol only (SCSI, Fibre Channel, SAS, and SSA). If the selected device is SATA or ATA, then the command will be ignored.

Disk drives determine the need to reassign physical sectors based on error activity and mode page settings. Once a physical sector requires assignment, the drive will either reassign the physical sector (block) or recommend to the initiator that the LBA associated with the physical sector be reassigned. You would use this function to repair unrecovered read errors. It won't be able to get any lost data back, but at least this provides a mechanism to make the problem go away.

 

Command-Line Syntax

smartmon-ux -rb BLOCKNUMBER device name
smartmon-ux -rb BLOCKNUMBERh device name

 

BLOCKNUMBER is a decimal number for the block number.

BLOCKNUMBERh is a hex number for the block number, ending with the lower-case letter h. Do not put a space between the last hex character and the h.  Make sure you enter the block number as a 4-byte or less number.

 

Examples

smartmon-ux -rb 12345678 /dev/sg3

smartmon-ux -rb 7f8ab0h /dev/sg3

 

Widget Usage

Enter the block number in either hex or decimal, and the browser will automatically fill the corresponding hex/decimal equivalent field as you type.  Only one block can be reassigned at a time, but this is generally not an issue since one would typically only want to reassign one or two blocks.  The program will immediately execute and return.  If the block can not be reassigned, the disk drive should be replaced (assuming you gave it a block number that really exists on the disk drive).

How To Detect Bad Blocks

Use command-line to run a self-test (-steb, or -scrub family) command, which scans entire disk for bad blocks, and/or reports known bad blocks that need reassignment.
Use the Certify Widget to run a self test to discover new defects, and Self-Test or Statistics Widget to show results
Run the Defects Widget or command-line to report known bad blocks
Your O/S will report uncorrectable errors when it tries to write to a disk drive, so look at event logs.
If your disk supports background media scanning, then you can use the Background Scan Widget or command-line to not only automate a search-and-repair, but also you may use it to generate reports on demand.
Our -scrub family of commands makes a single pass through the disk and returns a list of all blocks that had problems along with the sense information as shown above. This command is also safe to run on your host, but it does consume bandwidth, and the test may also take hours.  The -scrub command causes every block in the disk to be read while recording sense information and error codes, which it reports to the operator. He/she will then be able to see all errors and, if required, remap all of them without having to endure multiple passes.

 

Best Practices for Detecting Bad Blocks

Hardware that supports Background Media Scan will automatically detect, report, and repair bad blocks. You should always enable this first, unless you want to manually detect/repair bad blocks -- Perhaps you are running a video server and can't afford the few seconds of interrupted video streaming when bad blocks are repaired.
Otherwise use the Certify Widget [specifically, the extended background (-steb) self-test].  These built-in tests do not consume any host bandwidth. The test can take 30 minutes to several hours depending on the disk drive. This is a built-in test that is initiated by sending a single SCSI command. Once the test is invoked, SMARTMonUX returns and lets you know whether the test was successfully launched. As the test is a background test, it can be run on any and all disk drives, even while I/O is going on. The tests will temporarily suspend to service I/O requests from applications running on your host. One warning, these tests only report the first bad block found, so if you have multiple bad blocks you run the test, reassign, and repeat. (Don't blame us, this is how the test runs in the firmware.  That is why you should deploy premium disks that support Background Media Scanning)

 

 


Page url: http://www.santools.com/santool/index.html?repair.htm