]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: Add command to check the presence of any subvolumegroup/subvolume
authorNeeraj Pratap Singh <neesingh@redhat.com>
Tue, 28 Jun 2022 13:29:03 +0000 (18:59 +0530)
committerNeeraj Pratap Singh <neesingh@redhat.com>
Thu, 4 Aug 2022 14:42:37 +0000 (20:12 +0530)
Fixes: https://tracker.ceph.com/issues/55821
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
(cherry picked from commit 1c5fe5188aac8ac5394b591c73db40e8faf9a5b6)

doc/cephfs/fs-volumes.rst

index 99c494210d2f6a6e0273a98d9739fd72820904c1..0faf445817b75e36df70bb19cd26a78325fa7045 100644 (file)
@@ -135,6 +135,16 @@ The output format is JSON and contains fields as follows.
 * created_at: time of creation of subvolume group in the format "YYYY-MM-DD HH:MM:SS"
 * data_pool: data pool the subvolume group belongs to
 
+Check the presence of any subvolume group using::
+
+    $ ceph fs subvolumegroup exist <vol_name>
+
+The strings returned by the 'exist' command:
+    * "subvolumegroup exists": if any subvolumegroup is present
+    * "no subvolumegroup exists": if no subvolumegroup is present
+
+.. note:: It checks for the presence of custom groups and not the default one. To validate the emptiness of the volume, subvolumegroup existence check alone is not sufficient. The subvolume existence also needs to be checked as there might be subvolumes in the default group.
+
 Resize a subvolume group using::
 
     $ ceph fs subvolumegroup resize <vol_name> <group_name> <new_size> [--no_shrink]
@@ -275,6 +285,14 @@ List subvolumes using::
 
 .. note:: subvolumes that are removed but have snapshots retained, are also listed.
 
+Check the presence of any subvolume using::
+
+    $ ceph fs subvolume exist <vol_name> [--group_name <subvol_group_name>]
+
+The strings returned by the 'exist' command:
+    * "subvolume exists": if any subvolume of given group_name is present
+    * "no subvolume exists": if no subvolume of given group_name is present
+
 Set custom metadata on the subvolume as a key-value pair using::
 
     $ ceph fs subvolume metadata set <vol_name> <subvol_name> <key_name> <value> [--group_name <subvol_group_name>]