::
- ceph fs flag set enable_multiple true --yes-i-really-mean-it
ceph osd pool create cephfs_recovery_meta
- ceph fs new cephfs_recovery recovery <data_pool> --allow-dangerous-metadata-overlay
+ ceph fs new cephfs_recovery recovery <data_pool> --recover --allow-dangerous-metadata-overlay
+.. note::
-The recovery file system starts with an MDS rank that will initialize the new
-metadata pool with some metadata. This is necessary to bootstrap recovery.
-However, now we will take the MDS down as we do not want it interacting with
-the metadata pool further.
-
-::
-
- ceph fs fail cephfs_recovery
+ The ``--recover`` flag prevents any MDS from joining the new file system.
-Next, we will reset the initial metadata the MDS created:
+Next, we will create the intial metadata for the fs:
::
- cephfs-table-tool cephfs_recovery:all reset session
- cephfs-table-tool cephfs_recovery:all reset snap
- cephfs-table-tool cephfs_recovery:all reset inode
+ cephfs-table-tool cephfs_recovery:0 reset session
+ cephfs-table-tool cephfs_recovery:0 reset snap
+ cephfs-table-tool cephfs_recovery:0 reset inode
+ cephfs-journal-tool --rank cephfs_recovery:0 journal reset --force
Now perform the recovery of the metadata pool from the data pool:
::
cephfs-journal-tool --rank=<fs_name>:0 event recover_dentries list --alternate-pool cephfs_recovery_meta
- cephfs-journal-tool --rank cephfs_recovery:0 journal reset --force
After recovery, some recovered directories will have incorrect statistics.
Ensure the parameters ``mds_verify_scatter`` and ``mds_debug_scatterstat`` are
ceph config rm mds mds_verify_scatter
ceph config rm mds mds_debug_scatterstat
-(Note, the config may also have been set globally or via a ceph.conf file.)
+.. note::
+
+ Also verify the config has not been set globally or with a local ceph.conf file.
+
Now, allow an MDS to join the recovery file system:
::
ceph fs set cephfs_recovery joinable true
-Finally, run a forward :doc:`scrub </cephfs/scrub>` to repair the statistics.
+Finally, run a forward :doc:`scrub </cephfs/scrub>` to repair recursive statistics.
Ensure you have an MDS running and issue:
::
- ceph fs status # get active MDS
- ceph tell mds.<id> scrub start / recursive repair
+ ceph tell mds.recovery_fs:0 scrub start / recursive,repair,force
.. note::