In the event that a storage node reboots or a drive fails, it may be necessary to repair the content of one or more virtual disks.

Repair VDisks from UI


If there are sufficient copies remaining (as configured in the Advanced Settings while creating or editing a distributed data store) then drive content can always be repaired, without any downtime required.

  1. Click the Storage menu, and then the label of a data store to show the virtual disks in that store.
  2. If any of the VDisks has a red background, it can be repaired via UI.
  3. Click the disk label to view its details.
  4. On the screen that appears, select the Repair option next to the Consistency field. Note that only one VDisk can be repaired at a time.
  5. When the disk is successfully repaired, the consistency value will be changed from the "Degraded" to "Fully synced'.
  6. Once the content has been re-balanced, the disk will display a green icon again to indicate that all content is fully up-to-date.
The disk will be synchronized a short time after the disk repair is finished (approximately in two minutes).


Parallel VDisks Repairing in CLI


Parallelrepaivdisks enables you to repair up to 10 degraded VDisks simultaneously in CLI directly on compute resource or backup server. It's recommended to run in 'screen':

Also, you may indicate what data store will be repaired first or indicate the sequence of data stores. To repair VDISks in CLI:

  1. Log onto the compute resource via SSH.
  2. Get the list of the degraded VDisk with the following command: 

    getdegradedvdisks
    CODE
  3. Run the following command. To choose a number of parallel repairs, you can use the numthreads option.  For example, to start five repairs at once, you should type numthreads=5.

    parallelrepairvdisks [datastores=DS_UUID1,DS_UUID2,...], [numthreads=<1..10>]
    CODE

Please note that it could increase the load on compute resources, so if your compute resources are highly loaded, you can run parallelrepairvdisks in 4-5 threads.

Detect and Repair Out of Sync/Degraded VDisks


If you login to any compute resource from the CP server as root for a zone, you can use:

  • the getdegradedvdisks CLI tool tells you which VDisks are in a degraded path state and are repairable.
  • the parallelrepairvdisks repairs up to ten VDisks in parallel. 
  • the repairvdisks tool repairs all VDisks, one after another. You can safely run this periodically, for example as a cron task regardless of whether there are degraded VDisks or not.