Skip to content

Commit a6fb749

Browse files
authored
Merge pull request ceph#57534 from zdover23/wip-doc-2024-05-17-ceph-fs-volumes-2-of-x
doc/cephfs: edit fs-volumes.rst (2 of x) Reviewed-by: Anthony D'Atri <[email protected]>
2 parents b494674 + 0a3981a commit a6fb749

File tree

1 file changed

+123
-79
lines changed

1 file changed

+123
-79
lines changed

doc/cephfs/fs-volumes.rst

Lines changed: 123 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ List snapshots of a subvolume group by running a command of the following form:
268268
FS Subvolumes
269269
-------------
270270

271-
Create a subvolume using:
271+
Use a command of the following form to create a subvolume:
272272

273273
.. prompt:: bash #
274274

@@ -277,210 +277,245 @@ Create a subvolume using:
277277

278278
The command succeeds even if the subvolume already exists.
279279

280-
When creating a subvolume you can specify its subvolume group, data pool layout,
281-
uid, gid, file mode in octal numerals, and size in bytes. The size of the subvolume is
282-
specified by setting a quota on it (see :doc:`/cephfs/quota`). The subvolume can be
283-
created in a separate RADOS namespace by specifying --namespace-isolated option. By
284-
default a subvolume is created within the default subvolume group, and with an octal file
285-
mode '755', uid of its subvolume group, gid of its subvolume group, data pool layout of
286-
its parent directory and no size limit.
280+
When creating a subvolume, you can specify its subvolume group, data pool
281+
layout, uid, gid, file mode in octal numerals, and size in bytes. The size of
282+
the subvolume is specified by setting a quota on it (see :doc:`/cephfs/quota`).
283+
The subvolume can be created in a separate RADOS namespace by specifying the
284+
``--namespace-isolated`` option. By default, a subvolume is created within the
285+
default subvolume group with an octal file mode of ``755``, a uid of its
286+
subvolume group, a gid of its subvolume group, a data pool layout of its parent
287+
directory, and no size limit.
287288

288-
Remove a subvolume using:
289+
Use a command of the following form to remove a subvolume:
289290

290291
.. prompt:: bash #
291292

292293
ceph fs subvolume rm <vol_name> <subvol_name> [--group_name <subvol_group_name>] [--force] [--retain-snapshots]
293294

294-
The command removes the subvolume and its contents. It does this in two steps.
295-
First, it moves the subvolume to a trash folder, and then asynchronously purges
296-
its contents.
295+
This command removes the subvolume and its contents. This is done in two steps.
296+
First, the subvolume is moved to a trash folder. Second, the contents of that
297+
trash folder are purged asynchronously.
297298

298-
The removal of a subvolume fails if it has snapshots, or is non-existent.
299-
'--force' flag allows the non-existent subvolume remove command to succeed.
299+
Subvolume removal fails if the subvolume has snapshots or is non-existent. The
300+
``--force`` flag allows the "non-existent subvolume remove" command to succeed.
300301

301-
A subvolume can be removed retaining existing snapshots of the subvolume using the
302-
'--retain-snapshots' option. If snapshots are retained, the subvolume is considered
303-
empty for all operations not involving the retained snapshots.
302+
To remove a subvolume while retaining snapshots of the subvolume, use the
303+
``--retain-snapshots`` flag. If snapshots associated with a given subvolume are
304+
retained, then the subvolume is considered empty for all operations that do not
305+
involve the retained snapshots.
304306

305-
.. note:: Snapshot retained subvolumes can be recreated using 'ceph fs subvolume create'
307+
.. note:: Snapshot-retained subvolumes can be recreated using ``ceph fs
308+
subvolume create``.
306309

307-
.. note:: Retained snapshots can be used as a clone source to recreate the subvolume, or clone to a newer subvolume.
310+
.. note:: Retained snapshots can be used as clone sources for recreating the
311+
subvolume or for cloning to a newer subvolume.
308312

309-
Resize a subvolume using:
313+
Use a command of the following form to resize a subvolume:
310314

311315
.. prompt:: bash #
312316

313317
ceph fs subvolume resize <vol_name> <subvol_name> <new_size> [--group_name <subvol_group_name>] [--no_shrink]
314318

315-
The command resizes the subvolume quota using the size specified by ``new_size``.
316-
The ``--no_shrink`` flag prevents the subvolume from shrinking below the current used size of the subvolume.
319+
This command resizes the subvolume quota, using the size specified by
320+
``new_size``. The ``--no_shrink`` flag prevents the subvolume from shrinking
321+
below the current "used size" of the subvolume.
317322

318-
The subvolume can be resized to an unlimited (but sparse) logical size by passing ``inf`` or ``infinite`` as ``new_size``.
323+
The subvolume can be resized to an unlimited (but sparse) logical size by
324+
passing ``inf`` or ``infinite`` as ``<new_size>``.
319325

320-
Authorize cephx auth IDs, the read/read-write access to fs subvolumes:
326+
Use a command of the following form to authorize CephX auth IDs. This provides
327+
the read/read-write access to file system subvolumes:
321328

322329
.. prompt:: bash #
323330

324331
ceph fs subvolume authorize <vol_name> <sub_name> <auth_id> [--group_name=<group_name>] [--access_level=<access_level>]
325332

326-
The ``access_level`` takes ``r`` or ``rw`` as value.
333+
The ``<access_level>`` option takes either ``r`` or ``rw`` as a value.
327334

328-
Deauthorize cephx auth IDs, the read/read-write access to fs subvolumes:
335+
Use a command of the following form to deauthorize CephX auth IDs. This removes
336+
the read/read-write access to file system subvolumes:
329337

330338
.. prompt:: bash #
331339

332340
ceph fs subvolume deauthorize <vol_name> <sub_name> <auth_id> [--group_name=<group_name>]
333341

334-
List cephx auth IDs authorized to access fs subvolume:
342+
Use a command of the following form to list CephX auth IDs authorized to access
343+
the file system subvolume:
335344

336345
.. prompt:: bash #
337346

338347
ceph fs subvolume authorized_list <vol_name> <sub_name> [--group_name=<group_name>]
339348

340-
Evict fs clients based on auth ID and subvolume mounted:
349+
Use a command of the following form to evict file system clients based on the
350+
auth ID and the subvolume mounted:
341351

342352
.. prompt:: bash #
343353

344354
ceph fs subvolume evict <vol_name> <sub_name> <auth_id> [--group_name=<group_name>]
345355

346-
Fetch the absolute path of a subvolume using:
356+
Use a command of the following form to fetch the absolute path of a subvolume:
347357

348358
.. prompt:: bash #
349359

350360
ceph fs subvolume getpath <vol_name> <subvol_name> [--group_name <subvol_group_name>]
351361

352-
Fetch the information of a subvolume using:
362+
Use a command of the following form to fetch a subvolume's information:
353363

354364
.. prompt:: bash #
355365

356366
ceph fs subvolume info <vol_name> <subvol_name> [--group_name <subvol_group_name>]
357367

358-
The output format is JSON and contains fields as follows.
368+
The output format is JSON and contains the following fields.
359369

360-
* ``atime``: access time of the subvolume path in the format "YYYY-MM-DD HH:MM:SS"
361-
* ``mtime``: modification time of the subvolume path in the format "YYYY-MM-DD HH:MM:SS"
362-
* ``ctime``: change time of the subvolume path in the format "YYYY-MM-DD HH:MM:SS"
370+
* ``atime``: access time of the subvolume path in the format ``YYYY-MM-DD
371+
HH:MM:SS``
372+
* ``mtime``: modification time of the subvolume path in the format ``YYYY-MM-DD
373+
HH:MM:SS``
374+
* ``ctime``: change time of the subvolume path in the format ``YYYY-MM-DD
375+
HH:MM:SS``
363376
* ``uid``: uid of the subvolume path
364377
* ``gid``: gid of the subvolume path
365378
* ``mode``: mode of the subvolume path
366379
* ``mon_addrs``: list of monitor addresses
367-
* ``bytes_pcent``: quota used in percentage if quota is set, else displays ``undefined``
368-
* ``bytes_quota``: quota size in bytes if quota is set, else displays ``infinite``
380+
* ``bytes_pcent``: quota used in percentage if quota is set; else displays
381+
``undefined``
382+
* ``bytes_quota``: quota size in bytes if quota is set; else displays
383+
``infinite``
369384
* ``bytes_used``: current used size of the subvolume in bytes
370-
* ``created_at``: creation time of the subvolume in the format "YYYY-MM-DD HH:MM:SS"
385+
* ``created_at``: creation time of the subvolume in the format ``YYYY-MM-DD
386+
HH:MM:SS``
371387
* ``data_pool``: data pool to which the subvolume belongs
372388
* ``path``: absolute path of a subvolume
373-
* ``type``: subvolume type indicating whether it's clone or subvolume
389+
* ``type``: subvolume type, indicating whether it is ``clone`` or ``subvolume``
374390
* ``pool_namespace``: RADOS namespace of the subvolume
375391
* ``features``: features supported by the subvolume
376392
* ``state``: current state of the subvolume
377393

378-
If a subvolume has been removed retaining its snapshots, the output contains only fields as follows.
394+
If a subvolume has been removed but its snapshots have been retained, the
395+
output contains only the following fields.
379396

380-
* ``type``: subvolume type indicating whether it's clone or subvolume
397+
* ``type``: subvolume type indicating whether it is ``clone`` or ``subvolume``
381398
* ``features``: features supported by the subvolume
382399
* ``state``: current state of the subvolume
383400

384-
A subvolume's ``features`` are based on the internal version of the subvolume and are
385-
a subset of the following:
401+
A subvolume's ``features`` are based on the internal version of the subvolume
402+
and are a subset of the following:
386403

387-
* ``snapshot-clone``: supports cloning using a subvolumes snapshot as the source
388-
* ``snapshot-autoprotect``: supports automatically protecting snapshots, that are active clone sources, from deletion
389-
* ``snapshot-retention``: supports removing subvolume contents, retaining any existing snapshots
404+
* ``snapshot-clone``: supports cloning using a subvolume's snapshot as the
405+
source
406+
* ``snapshot-autoprotect``: supports automatically protecting snapshots from
407+
deletion if they are active clone sources
408+
* ``snapshot-retention``: supports removing subvolume contents, retaining any
409+
existing snapshots
390410

391-
A subvolume's ``state`` is based on the current state of the subvolume and contains one of the following values.
411+
A subvolume's ``state`` is based on the current state of the subvolume and
412+
contains one of the following values.
392413

393414
* ``complete``: subvolume is ready for all operations
394415
* ``snapshot-retained``: subvolume is removed but its snapshots are retained
395416

396-
List subvolumes using:
417+
Use a command of the following form to list subvolumes:
397418

398419
.. prompt:: bash #
399420

400421
ceph fs subvolume ls <vol_name> [--group_name <subvol_group_name>]
401422

402-
.. note:: subvolumes that are removed but have snapshots retained, are also listed.
423+
.. note:: Subvolumes that have been removed but have snapshots retained, are
424+
also listed.
403425

404-
Check the presence of any subvolume using:
426+
Use a command of the following form to check for the presence of a given
427+
subvolume:
405428

406429
.. prompt:: bash #
407430

408431
ceph fs subvolume exist <vol_name> [--group_name <subvol_group_name>]
409432

410433
These are the possible results of the ``exist`` command:
411434

412-
* ``subvolume exists``: if any subvolume of given group_name is present
413-
* ``no subvolume exists``: if no subvolume of given group_name is present
435+
* ``subvolume exists``: if any subvolume of given ``group_name`` is present
436+
* ``no subvolume exists``: if no subvolume of given ``group_name`` is present
414437

415-
Set custom metadata on the subvolume as a key-value pair using:
438+
Use a command of the following form to set custom metadata on the subvolume as
439+
a key-value pair:
416440

417441
.. prompt:: bash #
418442

419443
ceph fs subvolume metadata set <vol_name> <subvol_name> <key_name> <value> [--group_name <subvol_group_name>]
420444

421445
.. note:: If the key_name already exists then the old value will get replaced by the new value.
422446

423-
.. note:: key_name and value should be a string of ASCII characters (as specified in python's string.printable). key_name is case-insensitive and always stored in lower case.
447+
.. note:: ``key_name`` and ``value`` should be a string of ASCII characters (as
448+
specified in Python's ``string.printable``). ``key_name`` is
449+
case-insensitive and always stored in lower case.
424450

425-
.. note:: Custom metadata on a subvolume is not preserved when snapshotting the subvolume, and hence, is also not preserved when cloning the subvolume snapshot.
451+
.. note:: Custom metadata on a subvolume is not preserved when snapshotting the
452+
subvolume, and is therefore also not preserved when cloning the subvolume
453+
snapshot.
426454

427-
Get custom metadata set on the subvolume using the metadata key:
455+
Use a command of the following form to get the custom metadata set on the
456+
subvolume using the metadata key:
428457

429458
.. prompt:: bash #
430459

431460
ceph fs subvolume metadata get <vol_name> <subvol_name> <key_name> [--group_name <subvol_group_name>]
432461

433-
List custom metadata (key-value pairs) set on the subvolume using:
462+
Use a command of the following form to list custom metadata (key-value pairs)
463+
set on the subvolume:
434464

435465
.. prompt:: bash #
436466

437467
ceph fs subvolume metadata ls <vol_name> <subvol_name> [--group_name <subvol_group_name>]
438468

439-
Remove custom metadata set on the subvolume using the metadata key:
469+
Use a command of the following form to remove custom metadata set on the
470+
subvolume using the metadata key:
440471

441472
.. prompt:: bash #
442473

443474
ceph fs subvolume metadata rm <vol_name> <subvol_name> <key_name> [--group_name <subvol_group_name>] [--force]
444475

445-
Using the ``--force`` flag allows the command to succeed that would otherwise
446-
fail if the metadata key did not exist.
476+
Using the ``--force`` flag allows the command to succeed when it would
477+
otherwise fail (if the metadata key did not exist).
447478

448-
Create a snapshot of a subvolume using:
479+
Use a command of the following form to create a snapshot of a subvolume:
449480

450481
.. prompt:: bash #
451482

452483
ceph fs subvolume snapshot create <vol_name> <subvol_name> <snap_name> [--group_name <subvol_group_name>]
453484

454-
Remove a snapshot of a subvolume using:
485+
Use a command of the following form to remove a snapshot of a subvolume:
455486

456487
.. prompt:: bash #
457488

458489
ceph fs subvolume snapshot rm <vol_name> <subvol_name> <snap_name> [--group_name <subvol_group_name>] [--force]
459490

460-
Using the ``--force`` flag allows the command to succeed that would otherwise
461-
fail if the snapshot did not exist.
491+
Using the ``--force`` flag allows the command to succeed when it would
492+
otherwise fail (if the snapshot did not exist).
462493

463494
.. note:: if the last snapshot within a snapshot retained subvolume is removed, the subvolume is also removed
464495

465-
List snapshots of a subvolume using:
496+
Use a command of the following from to list the snapshots of a subvolume:
466497

467498
.. prompt:: bash #
468499

469500
ceph fs subvolume snapshot ls <vol_name> <subvol_name> [--group_name <subvol_group_name>]
470501

471-
Fetch the information of a snapshot using:
502+
Use a command of the following form to fetch a snapshot's information:
472503

473504
.. prompt:: bash #
474505

475506
ceph fs subvolume snapshot info <vol_name> <subvol_name> <snap_name> [--group_name <subvol_group_name>]
476507

477-
The output format is JSON and contains fields as follows.
508+
The output format is JSON and contains the following fields.
478509

479-
* ``created_at``: creation time of the snapshot in the format "YYYY-MM-DD HH:MM:SS:ffffff"
510+
* ``created_at``: creation time of the snapshot in the format ``YYYY-MM-DD
511+
HH:MM:SS:ffffff``
480512
* ``data_pool``: data pool to which the snapshot belongs
481-
* ``has_pending_clones``: ``yes`` if snapshot clone is in progress, otherwise ``no``
482-
* ``pending_clones``: list of in-progress or pending clones and their target group if any exist, otherwise this field is not shown
483-
* ``orphan_clones_count``: count of orphan clones if the snapshot has orphan clones, otherwise this field is not shown
513+
* ``has_pending_clones``: ``yes`` if snapshot clone is in progress, otherwise
514+
``no``
515+
* ``pending_clones``: list of in-progress or pending clones and their target
516+
groups if any exist; otherwise this field is not shown
517+
* ``orphan_clones_count``: count of orphan clones if the snapshot has orphan
518+
clones, otherwise this field is not shown
484519

485520
Sample output when snapshot clones are in progress or pending:
486521

@@ -523,38 +558,47 @@ Sample output when no snapshot clone is in progress or pending:
523558
"has_pending_clones": "no"
524559
}
525560

526-
Set custom key-value metadata on the snapshot by running:
561+
Use a command of the following form to set custom key-value metadata on the
562+
snapshot:
527563

528564
.. prompt:: bash #
529565

530566
ceph fs subvolume snapshot metadata set <vol_name> <subvol_name> <snap_name> <key_name> <value> [--group_name <subvol_group_name>]
531567

532-
.. note:: If the key_name already exists then the old value will get replaced by the new value.
568+
.. note:: If the ``key_name`` already exists then the old value will get replaced
569+
by the new value.
533570

534-
.. note:: The key_name and value should be a strings of ASCII characters (as specified in Python's ``string.printable``). The key_name is case-insensitive and always stored in lowercase.
571+
.. note:: The ``key_name`` and value should be a strings of ASCII characters
572+
(as specified in Python's ``string.printable``). The ``key_name`` is
573+
case-insensitive and always stored in lowercase.
535574

536-
.. note:: Custom metadata on a snapshot is not preserved when snapshotting the subvolume, and hence is also not preserved when cloning the subvolume snapshot.
575+
.. note:: Custom metadata on a snapshot is not preserved when snapshotting the
576+
subvolume, and is therefore not preserved when cloning the subvolume
577+
snapshot.
537578

538-
Get custom metadata set on the snapshot using the metadata key:
579+
Use a command of the following form to get custom metadata that has been set on
580+
the snapshot using the metadata key:
539581

540582
.. prompt:: bash #
541583

542584
ceph fs subvolume snapshot metadata get <vol_name> <subvol_name> <snap_name> <key_name> [--group_name <subvol_group_name>]
543585

544-
List custom metadata (key-value pairs) set on the snapshot using:
586+
Use a command of the following from to list custom metadata (key-value pairs)
587+
set on the snapshot:
545588

546589
.. prompt:: bash #
547590

548591
ceph fs subvolume snapshot metadata ls <vol_name> <subvol_name> <snap_name> [--group_name <subvol_group_name>]
549592

550-
Remove custom metadata set on the snapshot using the metadata key:
593+
Use a command of the following form to remove custom metadata set on the
594+
snapshot using the metadata key:
551595

552596
.. prompt:: bash #
553597

554598
ceph fs subvolume snapshot metadata rm <vol_name> <subvol_name> <snap_name> <key_name> [--group_name <subvol_group_name>] [--force]
555599

556-
Using the ``--force`` flag allows the command to succeed that would otherwise
557-
fail if the metadata key did not exist.
600+
Using the ``--force`` flag allows the command to succeed when it would otherwise
601+
fail (if the metadata key did not exist).
558602

559603
Cloning Snapshots
560604
-----------------

0 commit comments

Comments
 (0)