From: Patrick Donnelly Date: Tue, 12 Dec 2023 16:44:43 +0000 (-0500) Subject: doc/cephfs: use bash prompt for shell code X-Git-Tag: v19.3.0~363^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fc5c358f74f495eedca09abcde7ea2716a893314;p=ceph.git doc/cephfs: use bash prompt for shell code Signed-off-by: Patrick Donnelly --- diff --git a/doc/cephfs/multimds.rst b/doc/cephfs/multimds.rst index e50a5148ec2d..02564db45a88 100644 --- a/doc/cephfs/multimds.rst +++ b/doc/cephfs/multimds.rst @@ -116,7 +116,7 @@ The mechanism provided for this purpose is called an ``export pin``, an extended attribute of directories. The name of this extended attribute is ``ceph.dir.pin``. Users can set this attribute using standard commands: -:: +.. prompt:: bash # setfattr -n ceph.dir.pin -v 2 path/to/dir @@ -128,7 +128,7 @@ pin. In this way, setting the export pin on a directory affects all of its children. However, the parents pin can be overridden by setting the child directory's export pin. For example: -:: +.. prompt:: bash # mkdir -p a/b # "a" and "a/b" both start without an export pin set @@ -173,7 +173,7 @@ immediate children across a range of MDS ranks. The canonical example use-case would be the ``/home`` directory: we want every user's home directory to be spread across the entire MDS cluster. This can be set via: -:: +.. prompt:: bash # setfattr -n ceph.dir.pin.distributed -v 1 /cephfs/home @@ -183,7 +183,7 @@ may be ephemerally pinned. This is set through the extended attribute ``ceph.dir.pin.random`` with the value set to the percentage of directories that should be pinned. For example: -:: +.. prompt:: bash # setfattr -n ceph.dir.pin.random -v 0.5 /cephfs/tmp @@ -205,7 +205,7 @@ Ephemeral pins may override parent export pins and vice versa. What determines which policy is followed is the rule of the closest parent: if a closer parent directory has a conflicting policy, use that one instead. For example: -:: +.. prompt:: bash # mkdir -p foo/bar1/baz foo/bar2 setfattr -n ceph.dir.pin -v 0 foo @@ -217,7 +217,7 @@ directory will obey the pin on ``foo`` normally. For the reverse situation: -:: +.. prompt:: bash # mkdir -p home/{patrick,john} setfattr -n ceph.dir.pin.distributed -v 1 home @@ -229,7 +229,8 @@ because its export pin overrides the policy on ``home``. To remove a partitioning policy, remove the respective extended attribute or set the value to 0. -.. code::bash +.. prompt:: bash # + $ setfattr -n ceph.dir.pin.distributed -v 0 home # or $ setfattr -x ceph.dir.pin.distributed home @@ -237,7 +238,8 @@ or set the value to 0. For export pins, remove the extended attribute or set the extended attribute value to `-1`. -.. code::bash +.. prompt:: bash # + $ setfattr -n ceph.dir.pin -v -1 home @@ -260,27 +262,27 @@ static pinned subtrees. This option can be configured with the ``ceph fs set`` command. For example: -:: +.. prompt:: bash # ceph fs set bal_rank_mask Each bitfield of the ```` number represents a dedicated rank. If the ```` is set to ``0x3``, the balancer runs on active ``0`` and ``1`` ranks. For example: -:: +.. prompt:: bash # ceph fs set bal_rank_mask 0x3 If the ``bal_rank_mask`` is set to ``-1`` or ``all``, all active ranks are masked and utilized by the balancer. As an example: -:: +.. prompt:: bash # ceph fs set bal_rank_mask -1 On the other hand, if the balancer needs to be disabled, the ``bal_rank_mask`` should be set to ``0x0``. For example: -:: +.. prompt:: bash # ceph fs set bal_rank_mask 0x0