From df8e2383f676a3b1e7bea54e9667fad702954ed2 Mon Sep 17 00:00:00 2001 From: Nikhilkumar Shelke Date: Wed, 27 Apr 2022 22:11:07 +0530 Subject: [PATCH] docs: set, get, list and remove custom metadata for snapshot Set custom metadata on the snapshot as a key-value pair using $ ceph fs subvolume snapshot metadata set [--group_name ] note: If the key_name already exists then the old value will get replaced by the new value. note: The key_name and value should be a string of ASCII characters (as specified in python's string.printable). The key_name is case-insensitive and always stored in lower case. note: Custom metadata on a snapshots is not preserved when snapshotting the subvolume, and hence, is also not preserved when cloning the subvolume snapshot. Get custom metadata set on the snapshot using the metadata key:: $ ceph fs subvolume snapshot metadata get [--group_name ] List custom metadata (key-value pairs) set on the snapshot using:: $ ceph fs subvolume snapshot metadata ls [--group_name ] Remove custom metadata set on the snapshot using the metadata key:: $ ceph fs subvolume snapshot metadata rm [--group_name ] [--force] Using the '--force' flag allows the command to succeed that would otherwise fail if the metadata key did not exist. Fixes: https://tracker.ceph.com/issues/55401 Signed-off-by: Nikhilkumar Shelke (cherry picked from commit 59a0cbc14bf2832080e983729de5c462ddc70bb3) --- doc/cephfs/fs-volumes.rst | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/doc/cephfs/fs-volumes.rst b/doc/cephfs/fs-volumes.rst index fcd6af150e2e0..5fc877765baca 100644 --- a/doc/cephfs/fs-volumes.rst +++ b/doc/cephfs/fs-volumes.rst @@ -286,7 +286,7 @@ List snapshots of a subvolume using:: $ ceph fs subvolume snapshot ls [--group_name ] -Fetch the metadata of a snapshot using:: +Fetch the information of a snapshot using:: $ ceph fs subvolume snapshot info [--group_name ] @@ -297,6 +297,31 @@ The output format is json and contains fields as follows. * has_pending_clones: "yes" if snapshot clone is in progress otherwise "no" * size: snapshot size in bytes +Set custom metadata on the snapshot as a key-value pair using:: + + $ ceph fs subvolume snapshot metadata set [--group_name ] + +.. note:: If the key_name already exists then the old value will get replaced by the new value. + +.. note:: The key_name and value should be a string of ASCII characters (as specified in python's string.printable). The key_name is case-insensitive and always stored in lower case. + +.. note:: Custom metadata on a snapshots is not preserved when snapshotting the subvolume, and hence, is also not preserved when cloning the subvolume snapshot. + +Get custom metadata set on the snapshot using the metadata key:: + + $ ceph fs subvolume snapshot metadata get [--group_name ] + +List custom metadata (key-value pairs) set on the snapshot using:: + + $ ceph fs subvolume snapshot metadata ls [--group_name ] + +Remove custom metadata set on the snapshot using the metadata key:: + + $ ceph fs subvolume snapshot metadata rm [--group_name ] [--force] + +Using the '--force' flag allows the command to succeed that would otherwise +fail if the metadata key did not exist. + Cloning Snapshots ----------------- -- 2.39.5