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.
- Click the Storage menu, and then the label of a data store to show the virtual disks in that store.
- If any of the VDisks has a red background, it can be repaired via UI.
- Click the disk label to view its details.
- 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.
- When the disk is successfully repaired, the consistency value will be changed from the "Degraded" to "Fully synced'.
- 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.
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:
- Log onto the compute resource via SSH.
Get the list of the degraded VDisk with the following command:
Run the following command. To choose a number of parallel repairs, you can use the
numthreadsoption. For example, to start five repairs at once, you should type
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:
getdegradedvdisksCLI tool tells you which VDisks are in a degraded path state and are repairable.
parallelrepairvdisksrepairs up to ten VDisks in parallel.
repairvdiskstool 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.