Validating and repairing mirrored volume copies by using the CLI

You can use the repairvdiskcopy command from the command-line interface (CLI) to validate and repair mirrored volume copies.

Attention: Run the repairvdiskcopy command only if all volume copies are synchronized.

When you issue the repairvdiskcopy command, you must use only one of the -validate, -medium, or -resync parameters. You must also specify the name or ID of the volume to be validated and repaired as the last entry on the command line. After you issue the command, no output is displayed.

-validate
Use this parameter only if you want to verify that the mirrored volume copies are identical. If any difference is found, the command stops and logs an error that includes the logical block address (LBA) and the length of the first difference. You can use this parameter, starting at a different LBA each time to count the number of differences on a volume.
-medium
Use this parameter to convert sectors on all volume copies that contain different contents into virtual medium errors. Upon completion, the command logs an event, which indicates the number of differences that were found, the number that were converted into medium errors, and the number that were not converted. Use this option if you are unsure what the correct data is, and you do not want an incorrect version of the data to be used.
-resync
Use this parameter to overwrite contents from the specified primary volume copy to the other volume copy. The command corrects any differing sectors by copying the sectors from the primary copy to the copies that are being compared. Upon completion, the command process logs an event, which indicates the number of differences that were corrected. Use this action if you are sure that either the primary volume copy data is correct or that your host applications can handle incorrect data.
-startlba lba
Optionally, use this parameter to specify the starting Logical Block Address (LBA) from which to start the validation and repair. If you previously used the validate parameter, an error was logged with the LBA where the first difference, if any, was found. Reissue repairvdiskcopy with that LBA to avoid reprocessing the initial sectors that compared identically. Continue to reissue repairvdiskcopy by using this parameter to list all the differences.
Issue the following command to validate and, if necessary, automatically repair mirrored copies of the specified volume:
repairvdiskcopy -resync -startlba 20 vdisk8
Notes:
  1. Only one repairvdiskcopy command can run on a volume at a time.
  2. After you start the repairvdiskcopy command, you cannot use the command to stop processing.
  3. The primary copy of a mirrored volume cannot be changed while the repairvdiskcopy -resync command is running.
  4. If there is only one mirrored copy, the command returns immediately with an error.
  5. If a copy that is being compared goes offline, the command is halted with an error. The command is not automatically resumed when the copy is brought back online.
  6. In the case where one copy is readable but the other copy has a medium error, the command process automatically attempts to fix the medium error by writing the read data from the other copy.
  7. If no differing sectors are found during repairvdiskcopy processing, an informational error is logged at the end of the process.

Checking the progress of validation and repair of volume copies by using the CLI

Use the lsrepairvdiskcopyprogress command to display the progress of mirrored volume validation and repairs. You can specify a volume copy by using the -copyid parameter. To display the volume that has two or more copies with an active task, specify the command with no parameters; it is not possible to have only one volume copy with an active task.

To check the progress of validation and repair of mirrored volumes, issue the following command:
lsrepairvdiskcopyprogress –delim :
The following example shows how the command output is displayed:
vdisk_id:vdisk_name:copy id:task:progress:estimated_completion_time
0:vdisk0:0:medium:50:070301120000
0:vdisk0:1:medium:50:070301120000