]> 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>
Tue, 26 Jul 2022 11:03:14 +0000 (16:33 +0530)
Fixes: https://tracker.ceph.com/issues/55821
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
doc/cephfs/fs-volumes.rst

index c3b5b1390cbdf229474e8c215b3cded9e8802d52..55bd7b40d9d1021da255745327b687540bb182ec 100644 (file)
@@ -152,6 +152,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]
@@ -292,6 +302,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>]