This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack-documentation.git
The following commit(s) were added to refs/heads/4.19 by this push:
new 5a47bef Documentation for checkVolume API (#380)
5a47bef is described below
commit 5a47befd1a8614f082b706bbb5ed0cb88de12ddc
Author: Harikrishna <[email protected]>
AuthorDate: Thu Feb 29 14:40:21 2024 +0530
Documentation for checkVolume API (#380)
* Documentation for checkVolume API
* updated example command usage
* Added volume format details
* rephrasing some sentences
---
source/adminguide/storage.rst | 48 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/source/adminguide/storage.rst b/source/adminguide/storage.rst
index 3e1a68f..ffd7b25 100644
--- a/source/adminguide/storage.rst
+++ b/source/adminguide/storage.rst
@@ -962,6 +962,54 @@ Bytes read/write, as well as the total IO/s, are exposed
via UI, as shown in the
These statistics are obtained from the hypervisor directly and they represent
"current" bytes/s and IO/s values at the time of collection.
+Check and repair Volume
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When there are any leaks or any inconsistencies in the volume, then the
checkVolume API can be used to
+check for any such errors in the volume and helps in repairing them. This
feature is currently available only
+for KVM and volumes with QCOW2 format. This API uses "qemu-img check" command
on the KVM host.
+
+Also, a global or storage pool level setting
"volume.check.and.repair.leaks.before.use" is available which allows
+to check and repair any leaks of the volume during instance start and volume
attach operations.
+This will help in repairing any leaks of the volume before using it. This is a
blocking operation, meaning
+instance start or volume attach will be performed only after the check and
repair operation is completed.
+The setting helps in defining whether to allow this operation or not.
+
+checkVolume API takes two parameters as input
+
+- "id" for the volume UUID
+
+- "repair" an optional parameter whether to repair the volume or not.
Parameter takes "leaks" or "all" as the input.
+
+Following is the example for checkVolume API usage and the result in the
volume response.
+
+.. code:: bash
+
+ [root@mgmt]# cmk check volume id=55937826-2f08-414a-9eef-4c6b7d6fd3b1
repair=leaks
+ {
+ .
+ .
+ "volumecheckresult": {
+ "allocated-clusters": "110",
+ "check-errors": "0",
+ "leaks": 73,
+ "filename":
"/mnt/e72364b6-eab0-369f-af0b-2ec8bed9d8ac/55937826-2f08-414a-9eef-4c6b7d6fd3b1",
+ "format": "qcow2",
+ "fragmented-clusters": "32",
+ "image-end-offset": "7995392",
+ "total-clusters": "131072"
+ },
+ "volumerepairresult": {
+ "allocated-clusters": "110",
+ "check-errors": "0",
+ "leaks-fixed": 73,
+ "filename":
"/mnt/e72364b6-eab0-369f-af0b-2ec8bed9d8ac/55937826-2f08-414a-9eef-4c6b7d6fd3b1",
+ "format": "qcow2",
+ "fragmented-clusters": "32",
+ "image-end-offset": "7995392",
+ "total-clusters": "131072"
+ },
+ }
Working with Volume Snapshots
-----------------------------