From 168b912b026700644416390caf3540c1aaa75a62 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Tue, 21 Dec 2021 16:08:22 +0530 Subject: [PATCH] doc: Document subvolumegroup quota commands 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 --- doc/cephfs/fs-volumes.rst | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/doc/cephfs/fs-volumes.rst b/doc/cephfs/fs-volumes.rst index eb33b1f9399..709d1086a49 100644 --- a/doc/cephfs/fs-volumes.rst +++ b/doc/cephfs/fs-volumes.rst @@ -102,13 +102,15 @@ FS Subvolume groups Create a subvolume group using:: - $ ceph fs subvolumegroup create [--pool_layout ] [--uid ] [--gid ] [--mode ] + $ ceph fs subvolumegroup create [--size ] [--pool_layout ] [--uid ] [--gid ] [--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 data pool layout of its parent directory. @@ -131,6 +133,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 + +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 [--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 infinite size by passing 'inf' or 'infinite' +as the new_size. + Remove a snapshot of a subvolume group using:: $ ceph fs subvolumegroup snapshot rm [--force] -- 2.39.5