Skip to content

Commit 5789fde

Browse files
authored
Merge pull request ceph#57567 from zdover23/wip-doc-2024-05-20-cephfs-fs-volumes-cloning-snapshots
doc/cephfs: edit "Cloning Snapshots" in fs-volumes.rst Reviewed-by: Anthony D'Atri <[email protected]>
2 parents 88582e0 + 6994118 commit 5789fde

File tree

1 file changed

+46
-26
lines changed

1 file changed

+46
-26
lines changed

doc/cephfs/fs-volumes.rst

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -603,14 +603,17 @@ fail (if the metadata key did not exist).
603603
Cloning Snapshots
604604
-----------------
605605

606-
Subvolumes can be created by cloning subvolume snapshots. Cloning is an asynchronous operation that copies
607-
data from a snapshot to a subvolume. Due to this bulk copying, cloning is inefficient for very large
608-
data sets.
606+
Subvolumes can be created by cloning subvolume snapshots. Cloning is an
607+
asynchronous operation that copies data from a snapshot to a subvolume. Because
608+
cloning is an operation that involves bulk copying, it is inefficient for
609+
very large data sets.
609610

610-
.. note:: Removing a snapshot (source subvolume) would fail if there are pending or in progress clone operations.
611+
.. note:: Removing a snapshot (source subvolume) fails when there are
612+
pending or in-progress clone operations.
611613

612-
Protecting snapshots prior to cloning was a prerequisite in the Nautilus release, and the commands to protect/unprotect
613-
snapshots were introduced for this purpose. This prerequisite, and hence the commands to protect/unprotect, is being
614+
Protecting snapshots prior to cloning was a prerequisite in the Nautilus
615+
release. Commands that made possible the protection and unprotection of
616+
snapshots were introduced for this purpose. This prerequisite is being
614617
deprecated and may be removed from a future release.
615618

616619
The commands being deprecated are:
@@ -624,33 +627,38 @@ The commands being deprecated are:
624627

625628
.. note:: Use the ``subvolume info`` command to fetch subvolume metadata regarding supported ``features`` to help decide if protect/unprotect of snapshots is required, based on the availability of the ``snapshot-autoprotect`` feature.
626629

627-
To initiate a clone operation use:
630+
Run a command of the following form to initiate a clone operation:
628631

629632
.. prompt:: bash #
630633

631634
ceph fs subvolume snapshot clone <vol_name> <subvol_name> <snap_name> <target_subvol_name>
632635

633636
.. note:: ``subvolume snapshot clone`` command depends upon the above mentioned config option ``snapshot_clone_no_wait``
634637

635-
If a snapshot (source subvolume) is a part of non-default group, the group name needs to be specified:
638+
Run a command of the following form when a snapshot (source subvolume) is a
639+
part of non-default group. Note that the group name needs to be specified:
636640

637641
.. prompt:: bash #
638642

639643
ceph fs subvolume snapshot clone <vol_name> <subvol_name> <snap_name> <target_subvol_name> --group_name <subvol_group_name>
640644

641-
Cloned subvolumes can be a part of a different group than the source snapshot (by default, cloned subvolumes are created in default group). To clone to a particular group use:
645+
Cloned subvolumes can be a part of a different group than the source snapshot
646+
(by default, cloned subvolumes are created in default group). Run a command of
647+
the following form to clone to a particular group use:
642648

643649
.. prompt:: bash #
644650

645651
ceph fs subvolume snapshot clone <vol_name> <subvol_name> <snap_name> <target_subvol_name> --target_group_name <subvol_group_name>
646652

647-
Similar to specifying a pool layout when creating a subvolume, pool layout can be specified when creating a cloned subvolume. To create a cloned subvolume with a specific pool layout use:
653+
Pool layout can be specified when creating a cloned subvolume in a way that is
654+
similar to specifying a pool layout when creating a subvolume. Run a command of
655+
the following form to create a cloned subvolume with a specific pool layout:
648656

649657
.. prompt:: bash #
650658

651659
ceph fs subvolume snapshot clone <vol_name> <subvol_name> <snap_name> <target_subvol_name> --pool_layout <pool_layout>
652660

653-
To check the status of a clone operation use:
661+
Run a command of the following form to check the status of a clone operation:
654662

655663
.. prompt:: bash #
656664

@@ -716,11 +724,14 @@ Here is an example of a ``failed`` clone:
716724
}
717725
}
718726

719-
(NOTE: since ``subvol1`` is in the default group, the ``source`` object's ``clone status`` does not include the group name)
727+
.. note:: Because ``subvol1`` is in the default group, the ``source`` object's
728+
``clone status`` does not include the group name)
720729

721-
.. note:: Cloned subvolumes are accessible only after the clone operation has successfully completed.
730+
.. note:: Cloned subvolumes are accessible only after the clone operation has
731+
successfully completed.
722732

723-
After a successful clone operation, ``clone status`` will look like the below:
733+
After a successful clone operation, ``clone status`` will look like the
734+
following:
724735

725736
.. prompt:: bash #
726737

@@ -736,23 +747,28 @@ After a successful clone operation, ``clone status`` will look like the below:
736747

737748
If a clone operation is unsuccessful, the ``state`` value will be ``failed``.
738749

739-
To retry a failed clone operation, the incomplete clone must be deleted and the clone operation must be issued again.
740-
To delete a partial clone use:
750+
To retry a failed clone operation, the incomplete clone must be deleted and the
751+
clone operation must be issued again.
752+
753+
Run a command of the following form to delete a partial clone:
741754

742755
.. prompt:: bash #
743756

744757
ceph fs subvolume rm <vol_name> <clone_name> [--group_name <group_name>] --force
745758

746-
.. note:: Cloning synchronizes only directories, regular files and symbolic links. Inode timestamps (access and
747-
modification times) are synchronized up to seconds granularity.
759+
.. note:: Cloning synchronizes only directories, regular files and symbolic
760+
links. inode timestamps (access and modification times) are synchronized up
761+
to a second's granularity.
748762

749-
An ``in-progress`` or a ``pending`` clone operation may be canceled. To cancel a clone operation use the ``clone cancel`` command:
763+
An ``in-progress`` or a ``pending`` clone operation may be canceled. To cancel
764+
a clone operation use the ``clone cancel`` command:
750765

751766
.. prompt:: bash #
752767

753768
ceph fs clone cancel <vol_name> <clone_name> [--group_name <group_name>]
754769

755-
On successful cancellation, the cloned subvolume is moved to the ``canceled`` state:
770+
On successful cancellation, the cloned subvolume is moved to the ``canceled``
771+
state:
756772

757773
.. prompt:: bash #
758774

@@ -773,7 +789,8 @@ On successful cancellation, the cloned subvolume is moved to the ``canceled`` st
773789
}
774790
}
775791

776-
.. note:: The canceled cloned may be deleted by supplying the ``--force`` option to the `fs subvolume rm` command.
792+
.. note:: Delete the canceled cloned by supplying the ``--force`` option to the
793+
``fs subvolume rm`` command.
777794

778795
Configurables
779796
~~~~~~~~~~~~~
@@ -784,17 +801,20 @@ Configure the maximum number of concurrent clone operations. The default is 4:
784801

785802
ceph config set mgr mgr/volumes/max_concurrent_clones <value>
786803

787-
Configure the snapshot_clone_no_wait option :
804+
Configure the ``snapshot_clone_no_wait`` option:
788805

789-
The ``snapshot_clone_no_wait`` config option is used to reject clone creation requests when cloner threads
790-
(which can be configured using above option i.e. ``max_concurrent_clones``) are not available.
791-
It is enabled by default i.e. the value set is True, whereas it can be configured by using below command.
806+
The ``snapshot_clone_no_wait`` config option is used to reject clone-creation
807+
requests when cloner threads (which can be configured using the above options,
808+
for example, ``max_concurrent_clones``) are not available. It is enabled by
809+
default. This means that the value is set to ``True``, but it can be configured
810+
by using the following command:
792811

793812
.. prompt:: bash #
794813

795814
ceph config set mgr mgr/volumes/snapshot_clone_no_wait <bool>
796815

797-
The current value of ``snapshot_clone_no_wait`` can be fetched by using below command.
816+
The current value of ``snapshot_clone_no_wait`` can be fetched by running the
817+
following command.
798818

799819
.. prompt:: bash #
800820

0 commit comments

Comments
 (0)