Skip to content

Commit 174b9d4

Browse files
committed
doc: document earmark option for subvolume and new commands
Signed-off-by: Avan Thakkar <[email protected]>
1 parent d2f8d10 commit 174b9d4

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

doc/cephfs/fs-volumes.rst

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ Use a command of the following form to create a subvolume:
276276

277277
.. prompt:: bash #
278278

279-
ceph fs subvolume create <vol_name> <subvol_name> [--size <size_in_bytes>] [--group_name <subvol_group_name>] [--pool_layout <data_pool_name>] [--uid <uid>] [--gid <gid>] [--mode <octal_mode>] [--namespace-isolated]
279+
ceph fs subvolume create <vol_name> <subvol_name> [--size <size_in_bytes>] [--group_name <subvol_group_name>] [--pool_layout <data_pool_name>] [--uid <uid>] [--gid <gid>] [--mode <octal_mode>] [--namespace-isolated] [--earmark <earmark>]
280280

281281

282282
The command succeeds even if the subvolume already exists.
@@ -289,6 +289,15 @@ The subvolume can be created in a separate RADOS namespace by specifying the
289289
default subvolume group with an octal file mode of ``755``, a uid of its
290290
subvolume group, a gid of its subvolume group, a data pool layout of its parent
291291
directory, and no size limit.
292+
You can also assign an earmark to a subvolume using the ``--earmark`` option.
293+
The earmark is a unique identifier that tags the subvolume for specific purposes,
294+
such as NFS or SMB services. By default, no earmark is set, allowing for flexible
295+
assignment based on administrative needs. An empty string ("") can be used to remove
296+
any existing earmark from a subvolume.
297+
298+
The earmarking mechanism ensures that subvolumes are correctly tagged and managed,
299+
helping to avoid conflicts and ensuring that each subvolume is associated
300+
with the intended service or use case.
292301

293302
Removing a subvolume
294303
~~~~~~~~~~~~~~~~~~~~
@@ -418,6 +427,7 @@ The output format is JSON and contains the following fields.
418427
* ``pool_namespace``: RADOS namespace of the subvolume
419428
* ``features``: features supported by the subvolume
420429
* ``state``: current state of the subvolume
430+
* ``earmark``: earmark of the subvolume
421431

422432
If a subvolume has been removed but its snapshots have been retained, the
423433
output contains only the following fields.
@@ -522,6 +532,33 @@ subvolume using the metadata key:
522532
Using the ``--force`` flag allows the command to succeed when it would
523533
otherwise fail (if the metadata key did not exist).
524534

535+
Getting earmark of a subvolume
536+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
537+
538+
Use a command of the following form to get the earmark of a subvolume:
539+
540+
.. prompt:: bash #
541+
542+
ceph fs subvolume earmark get <vol_name> <subvol_name> [--group_name <subvol_group_name>]
543+
544+
Setting earmark of a subvolume
545+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
546+
547+
Use a command of the following form to set the earmark of a subvolume:
548+
549+
.. prompt:: bash #
550+
551+
ceph fs subvolume earmark set <vol_name> <subvol_name> [--group_name <subvol_group_name>] <earmark>
552+
553+
Removing earmark of a subvolume
554+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
555+
556+
Use a command of the following form to remove the earmark of a subvolume:
557+
558+
.. prompt:: bash #
559+
560+
ceph fs subvolume earmark rm <vol_name> <subvol_name> [--group_name <subvol_group_name>]
561+
525562
Creating a Snapshot of a Subvolume
526563
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
527564

0 commit comments

Comments
 (0)