You can use the repairvdiskcopy command
from the command-line interface (CLI) to validate and repair mirrored
VDisk copies.
Attention: Run the repairvdiskcopy command
only if all VDisk 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 VDisk 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 if you only want to verify that the mirrored
VDisk 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 VDisk.
- -medium
- Use this parameter to convert sectors on all VDisk 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
VDisk copy to the other VDisk copy. The command corrects any differing
sectors by copying the sectors from the primary copy to the copies
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 VDisk 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 using this
parameter to list all the differences.
Issue the following command to validate and,
if necessary, automatically repair mirrored copies of the specified
VDisk:
svctask repairvdiskcopy -resync -startlba 20 vdisk8
Notes: - Only one repairvdiskcopy command can
run on a VDisk at a time.
- Once you start the repairvdiskcopy command,
you cannot use the command to stop processing.
- The primary copy of a mirrored VDisk
cannot be changed while the repairvdiskcopy -resync command
is running.
- If there is only one mirrored copy, the command returns immediately
with an error.
- If a copy being compared goes offline, the command is halted with
an error. The command is not automatically resumed when the copy is
brought back online.
- 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.
- 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
VDisk copies using the CLI
Use the lsrepairvdiskcopyprogress command
to display the progress of mirrored VDisk validation and repairs.
You can specify a VDisk copy using the -copy id parameter.
To display the VDisks that have two or more copies with an active
task, specify the command with no parameters; it is not possible to
have only one VDisk copy with an active task.
To check the progress
of validation and repair of mirrored VDisks, issue the following command:
svcinfo 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