|
2 | 2 | CephFS Snapshots |
3 | 3 | ================ |
4 | 4 |
|
5 | | -CephFS snapshots create an immutable view of the file system at the point |
6 | | -in time they are taken. CephFS support snapshots which is managed in a |
7 | | -special hidden subdirectory named ``.snap`` .Snapshots are created using |
8 | | -``mkdir`` inside this directory. |
| 5 | +CephFS snapshots create an immutable view of the file system at the point in |
| 6 | +time they are taken. CephFS snapshots are managed in a special hidden |
| 7 | +subdirectory named ``.snap``. Snapshots are created using ``mkdir`` inside the |
| 8 | +``.snap`` directory. |
9 | 9 |
|
10 | | -Snapshots can be exposed with a different name by changing the following client configurations. |
| 10 | +Snapshots can be exposed with different names by changing the following client |
| 11 | +configurations: |
11 | 12 |
|
12 | 13 | - ``snapdirname`` which is a mount option for kernel clients |
13 | 14 | - ``client_snapdir`` which is a mount option for ceph-fuse. |
14 | 15 |
|
15 | 16 | Snapshot Creation |
16 | 17 | ================== |
17 | 18 |
|
18 | | -CephFS snapshot feature is enabled by default on new file systems. To enable |
19 | | -it on existing file systems, use the command below. |
| 19 | +The CephFS snapshot feature is enabled by default on new file systems. To |
| 20 | +enable the CephFS snapshot feature on existing file systems, use the command |
| 21 | +below. |
20 | 22 |
|
21 | 23 | .. code-block:: bash |
22 | 24 | |
23 | 25 | $ ceph fs set <fs_name> allow_new_snaps true |
24 | 26 |
|
25 | | -When snapshots are enabled, all directories in CephFS will have a special ``.snap`` |
26 | | -directory. (You may configure a different name with the client snapdir setting if |
27 | | -you wish.) |
28 | | -To create a CephFS snapshot, create a subdirectory under ``.snap`` with a name of |
29 | | -your choice. |
30 | | -For example, to create a snapshot on directory ``/file1/``, invoke ``mkdir /file1/.snap/snapshot-name`` |
| 27 | +When snapshots are enabled, all directories in CephFS will have a special |
| 28 | +``.snap`` directory. (You may configure a different name with the client's |
| 29 | +``snapdir`` setting if you wish.) To create a CephFS snapshot, create a |
| 30 | +subdirectory under ``.snap`` with a name of your choice. For example, to |
| 31 | +create a snapshot on directory ``/file1/``, run the command ``mkdir |
| 32 | +/file1/.snap/snapshot-name``: |
31 | 33 |
|
32 | 34 | .. code-block:: bash |
33 | 35 |
|
34 | 36 | $ touch file1 |
35 | 37 | $ cd .snap |
36 | 38 | $ mkdir my_snapshot |
37 | 39 |
|
38 | | -Using snapshot to recover data |
| 40 | +Using Snapshots to Recover Data |
39 | 41 | =============================== |
40 | 42 |
|
41 | | -Snapshots can also be used to recover some deleted files. |
| 43 | +Snapshots can also be used to recover deleted files: |
42 | 44 |
|
43 | 45 | - ``create a file1 and create snapshot snap1`` |
44 | 46 |
|
@@ -75,9 +77,9 @@ Snapshots can also be used to recover some deleted files. |
75 | 77 | Snapshot Deletion |
76 | 78 | ================== |
77 | 79 |
|
78 | | -Snapshots are deleted by invoking ``rmdir`` on the ``.snap`` directory they are |
79 | | -rooted in. (Attempts to delete a directory which roots the snapshots will fail; |
80 | | -you must delete the snapshots first.) |
| 80 | +Snapshots are deleted by running ``rmdir`` on the ``.snap`` directory that they |
| 81 | +are rooted in. (Attempts to delete a directory that roots the snapshots will |
| 82 | +fail. You must delete the snapshots first.) |
81 | 83 |
|
82 | 84 | .. code-block:: bash |
83 | 85 |
|
|
0 commit comments