Skip to main content

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:

  1. If possible, the customer should umount CephFS from all clients, so that all dirty pages are flushed.
  2. Prepare the ceph cluster:
# ceph osd set noout
# ceph osd set noin
  1. Wait until there is zero IO on the cluster, notify any leftover clients that they need to umount.
  2. Mark the CephFS down with:
# ceph fs set cephfs down true # "cephfs" is the name of the filesystem
  1. Stop all the ceph-osd's. (It is okay to skip this step if the servers will be cleanly powered off)
  2. Power off the servers.
  3. Power on the cluster.
  4. Wait for osds/mds to boot and all PGs active.
  5. Mark the CephFS back online:
# ceph fs set cephfs down false
  1. Reconnect and test clients.
  2. Remove the flags set in Step 2:
# ceph osd unset noout
# ceph osd unset noin