Skip to content

Commit 4112ae6

Browse files
Merge pull request ceph#63033 from bluikko/doc-placement-formatting-radosgw
doc/radosgw: Promptify cmds and improve formatting in placement.rst
2 parents 6467ccf + 0e190b8 commit 4112ae6

File tree

1 file changed

+45
-42
lines changed

1 file changed

+45
-42
lines changed

doc/radosgw/placement.rst

Lines changed: 45 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,12 @@ the zonegroups and zones.
4444

4545
The zonegroup placement configuration can be queried with:
4646

47+
.. prompt:: bash #
48+
49+
radosgw-admin zonegroup get
50+
4751
::
4852

49-
$ radosgw-admin zonegroup get
5053
{
5154
"id": "ab01123f-e0df-4f29-9d71-b44888d67cd5",
5255
"name": "default",
@@ -67,9 +70,12 @@ The zonegroup placement configuration can be queried with:
6770

6871
The zone placement configuration can be queried with:
6972

73+
.. prompt:: bash #
74+
75+
radosgw-admin zone get
76+
7077
::
7178

72-
$ radosgw-admin zone get
7379
{
7480
"id": "557cdcee-3aae-4e9e-85c7-2f86f5eddb1f",
7581
"name": "default",
@@ -107,34 +113,32 @@ Adding a Placement Target
107113
To create a new placement target named ``temporary``, add it to
108114
the zonegroup:
109115

110-
::
116+
.. prompt:: bash #
111117

112-
$ radosgw-admin zonegroup placement add \
113-
--rgw-zonegroup default \
114-
--placement-id temporary
118+
radosgw-admin zonegroup placement add --rgw-zonegroup default \
119+
--placement-id temporary
115120

116121
Then provide the zone placement info for that target:
117122

118-
::
123+
.. prompt:: bash #
119124

120-
$ radosgw-admin zone placement add \
121-
--rgw-zone default \
122-
--placement-id temporary \
123-
--data-pool default.rgw.temporary.data \
124-
--index-pool default.rgw.temporary.index \
125-
--data-extra-pool default.rgw.temporary.non-ec
125+
radosgw-admin zone placement add --rgw-zone default \
126+
--placement-id temporary \
127+
--data-pool default.rgw.temporary.data \
128+
--index-pool default.rgw.temporary.index \
129+
--data-extra-pool default.rgw.temporary.non-ec
126130

127-
.. note:: With default placement target settings, RGW stores an object's first data chunk in the RADOS `HEAD` object along
128-
with XATTR metadata. The `--placement-inline-data=false` flag may be passed with the `zone placement add` or
129-
`zone placement modify` commands to change this behavior for new objects stored on the target.
131+
.. note:: With default placement target settings, RGW stores an object's first data chunk in the RADOS ``HEAD`` object along
132+
with XATTR metadata. The ``--placement-inline-data=false`` flag may be passed with the ``zone placement add`` or
133+
``zone placement modify`` commands to change this behavior for new objects stored on the target.
130134
When data is stored inline (default), it may provide an advantage for read/write workloads since the first chunk of
131135
an object's data can be retrieved/stored in a single librados call along with object metadata. On the other hand, a
132136
target that does not store data inline can provide a performance benefit for RGW client delete requests when
133137
the BlueStore DB is located on faster storage than bucket data since it eliminates the need to access
134138
slower devices synchronously while processing the client request. In that case, data associated with the deleted
135139
objects is removed asynchronously in the background by garbage collection. Note that inlining is only ever performed
136140
when writing to the default storage class. Inlining is *never* performed when writing to a non-default
137-
storage class.
141+
storage class.
138142

139143
.. _adding_a_storage_class:
140144

@@ -144,23 +148,21 @@ Adding a Storage Class
144148
To add a new storage class named ``STANDARD_IA`` to the ``default-placement`` target,
145149
start by adding it to the zonegroup:
146150

147-
::
151+
.. prompt:: bash #
148152

149-
$ radosgw-admin zonegroup placement add \
150-
--rgw-zonegroup default \
151-
--placement-id default-placement \
152-
--storage-class STANDARD_IA
153+
radosgw-admin zonegroup placement add --rgw-zonegroup default \
154+
--placement-id default-placement \
155+
--storage-class STANDARD_IA
153156

154157
Then provide the zone placement info for that storage class:
155158

156-
::
159+
.. prompt:: bash #
157160

158-
$ radosgw-admin zone placement add \
159-
--rgw-zone default \
160-
--placement-id default-placement \
161-
--storage-class STANDARD_IA \
162-
--data-pool default.rgw.glacier.data \
163-
--compression lz4
161+
radosgw-admin zone placement add --rgw-zone default \
162+
--placement-id default-placement \
163+
--storage-class STANDARD_IA \
164+
--data-pool default.rgw.glacier.data \
165+
--compression lz4
164166

165167
Customizing Placement
166168
=====================
@@ -171,11 +173,10 @@ Default Placement
171173
By default, new buckets will use the zonegroup's ``default_placement`` target.
172174
This zonegroup setting can be changed with:
173175

174-
::
176+
.. prompt:: bash #
175177

176-
$ radosgw-admin zonegroup placement default \
177-
--rgw-zonegroup default \
178-
--placement-id new-placement
178+
radosgw-admin zonegroup placement default --rgw-zonegroup default \
179+
--placement-id new-placement
179180

180181
User Placement
181182
--------------
@@ -185,9 +186,12 @@ target by setting a non-empty ``default_placement`` field in the user info.
185186
Similarly, the ``default_storage_class`` can override the ``STANDARD``
186187
storage class applied to objects by default.
187188

189+
.. prompt:: bash #
190+
191+
radosgw-admin user info --uid testid
192+
188193
::
189194

190-
$ radosgw-admin user info --uid testid
191195
{
192196
...
193197
"default_placement": "",
@@ -203,24 +207,23 @@ to restrict access to certain types of storage.
203207

204208
The ``radosgw-admin`` command can modify these fields directly with:
205209

206-
::
210+
.. prompt:: bash #
207211

208-
$ radosgw-admin user modify \
209-
--uid <user-id> \
210-
--placement-id <default-placement-id> \
211-
--storage-class <default-storage-class> \
212-
--tags <tag1,tag2>
212+
radosgw-admin user modify --uid <user-id> \
213+
--placement-id <default-placement-id> \
214+
--storage-class <default-storage-class> \
215+
--tags <tag1,tag2>
213216

214217
.. _s3_bucket_placement:
215218

216219
S3 Bucket Placement
217220
-------------------
218221

219222
When creating a bucket with the S3 protocol, a placement target can be
220-
provided as part of the LocationConstraint to override the default placement
223+
provided as part of the ``LocationConstraint`` to override the default placement
221224
targets from the user and zonegroup.
222225

223-
Normally, the LocationConstraint must match the zonegroup's ``api_name``:
226+
Normally, the ``LocationConstraint`` must match the zonegroup's ``api_name``:
224227

225228
::
226229

0 commit comments

Comments
 (0)