]> git.proxmox.com Git - ceph.git/blame - ceph/doc/cephfs/standby.rst
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / doc / cephfs / standby.rst
CommitLineData
11fdf7f2 1.. _mds-standby:
7c673cae
FG
2
3Terminology
4-----------
5
6A Ceph cluster may have zero or more CephFS *filesystems*. CephFS
7filesystems have a human readable name (set in ``fs new``)
8and an integer ID. The ID is called the filesystem cluster ID,
9or *FSCID*.
10
11Each CephFS filesystem has a number of *ranks*, one by default,
12which start at zero. A rank may be thought of as a metadata shard.
13Controlling the number of ranks in a filesystem is described
14in :doc:`/cephfs/multimds`
15
16Each CephFS ceph-mds process (a *daemon*) initially starts up
17without a rank. It may be assigned one by the monitor cluster.
18A daemon may only hold one rank at a time. Daemons only give up
19a rank when the ceph-mds process stops.
20
21If a rank is not associated with a daemon, the rank is
22considered *failed*. Once a rank is assigned to a daemon,
23the rank is considered *up*.
24
25A daemon has a *name* that is set statically by the administrator
26when the daemon is first configured. Typical configurations
27use the hostname where the daemon runs as the daemon name.
28
29Each time a daemon starts up, it is also assigned a *GID*, which
30is unique to this particular process lifetime of the daemon. The
31GID is an integer.
32
33Referring to MDS daemons
34------------------------
35
36Most of the administrative commands that refer to an MDS daemon
37accept a flexible argument format that may contain a rank, a GID
38or a name.
39
40Where a rank is used, this may optionally be qualified with
41a leading filesystem name or ID. If a daemon is a standby (i.e.
42it is not currently assigned a rank), then it may only be
43referred to by GID or name.
44
45For example, if we had an MDS daemon which was called 'myhost',
46had GID 5446, and was assigned rank 0 in the filesystem 'myfs'
47which had FSCID 3, then any of the following would be suitable
48forms of the 'fail' command:
49
50::
51
52 ceph mds fail 5446 # GID
53 ceph mds fail myhost # Daemon name
54 ceph mds fail 0 # Unqualified rank
55 ceph mds fail 3:0 # FSCID and rank
56 ceph mds fail myfs:0 # Filesystem name and rank
57
58Managing failover
59-----------------
60
11fdf7f2
TL
61If an MDS daemon stops communicating with the monitor, the monitor will wait
62``mds_beacon_grace`` seconds (default 15 seconds) before marking the daemon as
63*laggy*. If a standby is available, the monitor will immediately replace the
64laggy daemon.
7c673cae
FG
65
66Each file system may specify a number of standby daemons to be considered
67healthy. This number includes daemons in standby-replay waiting for a rank to
68fail (remember that a standby-replay daemon will not be assigned to take over a
69failure for another rank or a failure in a another CephFS file system). The
70pool of standby daemons not in replay count towards any file system count.
71Each file system may set the number of standby daemons wanted using:
72
73::
74
75 ceph fs set <fs name> standby_count_wanted <count>
76
77Setting ``count`` to 0 will disable the health check.
78
79
11fdf7f2 80.. _mds-standby-replay:
7c673cae 81
11fdf7f2
TL
82Configuring standby-replay
83--------------------------
7c673cae 84
11fdf7f2
TL
85Each CephFS file system may be configured to add standby-replay daemons. These
86standby daemons follow the active MDS's metadata journal to reduce failover
87time in the event the active MDS becomes unavailable. Each active MDS may have
88only one standby-replay daemon following it.
7c673cae 89
11fdf7f2 90Configuring standby-replay on a file system is done using:
7c673cae
FG
91
92::
7c673cae 93
11fdf7f2 94 ceph fs set <fs name> allow_standby_replay <bool>
7c673cae 95
11fdf7f2
TL
96Once set, the monitors will assign available standby daemons to follow the
97active MDSs in that file system.
7c673cae 98
11fdf7f2
TL
99Once an MDS has entered the standby-replay state, it will only be used as a
100standby for the rank that it is following. If another rank fails, this
101standby-replay daemon will not be used as a replacement, even if no other
102standbys are available. For this reason, it is advised that if standby-replay
103is used then every active MDS should have a standby-replay daemon.