CephFS Clean Power Off Procedure
Problem
A customer would like to cleanly power off their CephFS cluster before a power or network intervention.
Solution
Warning: There are reports that marking a CephFS cluster down can damage the filesystem. Please use caution when executing this procedure. See https://tracker.ceph.com/issues/65094
Use the following steps to cleanly unmount and switch off a CephFS cluster:
- If possible, the customer should umount CephFS from all clients, so that all dirty pages are flushed.
- Prepare the ceph cluster:
# ceph osd set noout
# ceph osd set noin
- Wait until there is zero IO on the cluster, notify any leftover clients that they need to umount.
- Mark the CephFS down with:
# ceph fs set cephfs down true # "cephfs" is the name of the filesystem
- Stop all the ceph-osd's. (It is okay to skip this step if the servers will be cleanly powered off)
- Power off the servers.
- Power on the cluster.
- Wait for osds/mds to boot and all PGs active.
- Mark the CephFS back online:
# ceph fs set cephfs down false
- Reconnect and test clients.
- Remove the flags set in Step 2:
# ceph osd unset noout
# ceph osd unset noin