Manually evicting a CephFS client

You might want to manually evict a Ceph File System (CephFS) client if the client is misbehaving and you do not have access to the client node, or if a client dies and you do not want to wait for the client session to time out.

Before you begin

Before evicting a Ceph File System client, be sure that you have root-level access to the Ceph Monitor node.

Procedure

  1. Review the client list.
    ceph tell DAEMON_NAME client ls
    For example:
    [ceph: root@host01 /]# ceph tell mds.0 client ls
    [
        {
            "id": 47385,
            "entity": {
                "name": {
                    "type": "client",
                    "num": 47385
                },
                "addr": {
                    "type": "any",
                    "addr": "10.8.128.23:0",
                    "nonce": 428447873
                }
            },
            "state": "open",
            "num_leases": 0,
            "num_caps": 0,
            "request_load_avg": 0,
            "uptime": 829961.12384965899,
            "requests_in_flight": 0,
            "num_completed_requests": 0,
            "num_completed_flushes": 0,
            "reconnecting": false,
            "recall_caps": {
                "value": 0,
                "halflife": 60
            },
            "release_caps": {
                "value": 0,
                "halflife": 60
            },
            "recall_caps_throttle": {
                "value": 0,
                "halflife": 1.5
            },
            "recall_caps_throttle2o": {
                "value": 0,
                "halflife": 0.5
            },
            "session_cache_liveness": {
                "value": 0,
                "halflife": 300
            },
            "cap_acquisition": {
                "value": 0,
                "halflife": 10
            },
            "delegated_inos": [],
            "inst": "client.47385 10.8.128.23:0/428447873",
            "completed_requests": [],
            "prealloc_inos": [],
            "client_metadata": {
                "client_features": {
                    "feature_bits": "0x00000000000fffff"
                },
                "metric_spec": {
                    "metric_flags": {
                        "feature_bits": "0x000000000000ffff"
                    }
                },
                "ceph_sha1": "3c9b67d46bf428c8eb52f31dfd4c722a2e896cf7",
                "ceph_version": "ceph version 17.2.6-96.el9cp (3c9b67d46bf428c8eb52f31dfd4c722a2e896cf7) quincy (stable)",
                "entity_id": "admin",
                "hostname": "node03",
                "mount_point": "/mnt/cephfs_io_tbmutle114_1",
                "pid": "16699",
                "root": "/"
            }
    ]
  2. Evict the specified CephFS client.
    ceph tell DAEMON_NAME client evict id=ID_NUMBER
    For example:
    [ceph: root@host01 /]# ceph tell mds.0 client evict id=4305