ceph集群警告信息如下:
ceph -s
health HEALTH_WARN
mds0: Client xxx-online00.gz01 failing to respond to cache pressure类型 | 描述 |
|---|---|
消息: | “Client name failing to respond to cache pressure” |
代码: | MDS_HEALTH_CLIENT_RECALL,MDS_HEALTH_CLIENT_RECALL_MANY |
描述: | 客户端有各自的元数据缓存,客户端缓存中的条目(比如索引节点)也会存在于 MDS 缓存中,所以当 MDS 需要削减其缓存时(保持在 mds_cache_size 以下),它也会发消息给客户端让它们削减自己的缓存。如果有客户端没响应或者有缺陷,就会妨碍 MDS 将缓存保持在 mds_cache_size 以下, MDS 就有可能耗尽内存而后崩溃。如果某个客户端的响应时间超过了 mds_recall_state_timeout (默认为 60s ),这条消息就会出现。 |
$ ceph daemon mds.ceph-epnfs-mds01.gz01 session ls
[
{
"id": 4746087,
"num_leases": 9,
"num_caps": 57368,
"state": "open",
"replay_requests": 0,
"completed_requests": 1,
"reconnecting": false,
"inst": "client.4746087 10.1.7.1:0\/1700679012",
"client_metadata": {
"entity_id": "admin",
"hostname": "test-hostname00",
"kernel_version": "3.10.0-514.16.1.el7.x86_64"
}
}
]跟踪代码发现num_caps就是统计的客户端的inode数量, 大概统计了下已经打开的inode数量。

主从切换流程:
成功切换主从角色
问题:mds在切换过程中,导致繁忙cpu很高,在mds_beacon_grace(默认15s)时间内没有向monitor注册,没有及时汇报心跳给mon,导致mds自杀。
mds存储:
mds冷备/热备:
mds主备切换策略:
节点失效机制:
恢复过程:
resolve阶段的事件:
重建分布式缓存和锁状态:
为啥mds切换导致cpu高?
2018-04-27 19:12:21.909280 7f8268805700 1 mds.0.2665 rejoin_start
2018-04-27 19:12:37.294438 7f826a809700 1 heartbeat_map is_healthy 'MDSRank' had timed out after 15
2018-04-27 19:12:40.961787 7f82656fe700 1 heartbeat_map is_healthy 'MDSRank' had timed out after 15
2018-04-27 19:12:40.961796 7f82656fe700 1 mds.beacon.ceph-xxx-mds01.gz01 _send skipping beacon, heartbeat map not healthy
2018-04-27 19:12:42.294507 7f826a809700 1 heartbeat_map is_healthy 'MDSRank' had timed out after 15



问题:mds主从切换open inode没有释放,mds集群显示mds0: Client xxx-online00.gz01 failing to respond to cache pressure 解决方式:(由于inode都缓存在client端,所以必须的想办法释放inode)
