File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -59,3 +59,53 @@ Note that this command acts as a normal CephFS client to find all the
5959files in the file system and read their layouts, so the MDS must be
6060up and running.
6161
62+ Using first-damage.py
63+ ---------------------
64+
65+ #. Unmount all clients.
66+
67+ #. Flush the journal if possible:
68+
69+ .. prompt :: bash #
70+
71+ ceph tell mds.<fs_name>:0 flush journal
72+
73+ #. Fail the file system:
74+
75+ .. prompt :: bash #
76+
77+ ceph fs fail <fs_name>
78+
79+ #. Recover dentries from the journal. If the MDS flushed the journal
80+ successfully, this will be a no-op:
81+
82+ .. prompt :: bash #
83+
84+ cephfs-journal-tool --rank=<fs_name>:0 event recover_dentries summary
85+
86+ #. Reset the journal:
87+
88+ .. prompt :: bash #
89+
90+ cephfs-journal-tool --rank=<fs_name>:0 journal reset --yes-i-really-mean-it
91+
92+ #. Run ``first-damage.py `` to list damaged dentries:
93+
94+ .. prompt :: bash #
95+
96+ python3 first-damage.py --memo run.1 <pool>
97+
98+ #. Optionally, remove the damaged dentries:
99+
100+ .. prompt :: bash #
101+
102+ python3 first-damage.py --memo run.2 --remove <pool>
103+
104+ .. note :: use ``--memo`` to specify a different file to save objects that
105+ have already been traversed. This makes it possible to separate data made
106+ during different, independent runs.
107+
108+ This command has the effect of removing a dentry from the snapshot or
109+ head (in the current hierarchy). The inode's linkage will be lost. The
110+ inode may however be recoverable in ``lost+found `` during a future
111+ data-scan recovery.
You can’t perform that action at this time.
0 commit comments