]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: Document subvolumegroup quota commands
authorKotresh HR <khiremat@redhat.com>
Tue, 21 Dec 2021 10:38:22 +0000 (16:08 +0530)
committerNikhilkumar Shelke <nshelke@redhat.com>
Wed, 22 Jun 2022 06:53:43 +0000 (12:23 +0530)
Add documentation for subvolume group quota along
with 'subvolumegroup resize' and 'subvolumegroup info'
commands

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 168b912b026700644416390caf3540c1aaa75a62)

doc/cephfs/fs-volumes.rst

index e80540e6fa83c1cabfe3cc3783ee54a628eb088b..c886fa7101a4163aaf24b36d283649fc8434f751 100644 (file)
@@ -85,13 +85,15 @@ FS Subvolume groups
 
 Create a subvolume group using::
 
-    $ ceph fs subvolumegroup create <vol_name> <group_name> [--pool_layout <data_pool_name>] [--uid <uid>] [--gid <gid>] [--mode <octal_mode>]
+    $ ceph fs subvolumegroup create <vol_name> <group_name> [--size <size_in_bytes>] [--pool_layout <data_pool_name>] [--uid <uid>] [--gid <gid>] [--mode <octal_mode>]
 
 The command succeeds even if the subvolume group already exists.
 
 When creating a subvolume group you can specify its data pool layout (see
-:doc:`/cephfs/file-layouts`), uid, gid, and file mode in octal numerals. By default, the
-subvolume group is created with an octal file mode '755', uid '0', gid '0' and data pool
+:doc:`/cephfs/file-layouts`), uid, gid, file mode in octal numerals and
+size in bytes. The size of the subvolume group is specified by setting
+a quota on it (see :doc:`/cephfs/quota`). By default, the subvolume group
+is created with an octal file mode '755', uid '0', gid '0' and the data pool
 layout of its parent directory.
 
 
@@ -114,6 +116,36 @@ List subvolume groups using::
 .. note:: Subvolume group snapshot feature is no longer supported in mainline CephFS (existing group
           snapshots can still be listed and deleted)
 
+Fetch the metadata of a subvolume group using::
+
+    $ ceph fs subvolumegroup info <vol_name> <group_name>
+
+The output format is JSON and contains fields as follows.
+
+* atime: access time of subvolume group path in the format "YYYY-MM-DD HH:MM:SS"
+* mtime: modification time of subvolume group path in the format "YYYY-MM-DD HH:MM:SS"
+* ctime: change time of subvolume group path in the format "YYYY-MM-DD HH:MM:SS"
+* uid: uid of subvolume group path
+* gid: gid of subvolume group path
+* mode: mode of subvolume group path
+* mon_addrs: list of monitor addresses
+* bytes_pcent: quota used in percentage if quota is set, else displays "undefined"
+* bytes_quota: quota size in bytes if quota is set, else displays "infinite"
+* bytes_used: current used size of the subvolume group in bytes
+* 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
+
+Resize a subvolume group using::
+
+    $ ceph fs subvolumegroup resize <vol_name> <group_name> <new_size> [--no_shrink]
+
+The command resizes the subvolume group quota using the size specified by 'new_size'.
+The '--no_shrink' flag prevents the subvolume group to shrink below the current used
+size of the subvolume group.
+
+The subvolume group can be resized to an unlimited size by passing 'inf' or 'infinite'
+as the new_size.
+
 Remove a snapshot of a subvolume group using::
 
     $ ceph fs subvolumegroup snapshot rm <vol_name> <group_name> <snap_name> [--force]