# 主数据库 172.17.0.2 6379 下线了 1:X 26 Jun 2023 13:46:29.680 # +sdown master redis-master 172.17.0.2 6379 1:X 26 Jun 2023 13:46:29.823 # Could not rename tmp config file (Device or resource busy) 1:X 26 Jun 2023 13:46:29.823 # WARNING: Sentinel was not able to save the new configuration on disk!!!: Device or resource busy 1:X 26 Jun 2023 13:46:29.823 # +new-epoch 1 1:X 26 Jun 2023 13:46:29.825 # Could not rename tmp config file (Device or resource busy) 1:X 26 Jun 2023 13:46:29.825 # WARNING: Sentinel was not able to save the new configuration on disk!!!: Device or resource busy 1:X 26 Jun 2023 13:46:29.825 # +vote-for-leader 07a74f95d2f3284e2bcbd34bac98b29e527d5878 1 # 等待了 30000 毫秒之后(注意日志时间),3 个哨兵判断主数据库下线,超过了配置的 2 个哨兵,哨兵主观确定主数据库下线 1:X 26 Jun 2023 13:46:30.842 # +odown master redis-master 172.17.0.2 6379 #quorum 3/2 1:X 26 Jun 2023 13:46:30.842 # Next failover delay: I will not start a failover before Mon Jun 26 13:52:29 2023 1:X 26 Jun 2023 13:46:31.039 # +config-update-from sentinel 07a74f95d2f3284e2bcbd34bac98b29e527d5878 172.17.0.8 26379 @ redis-master 172.17.0.2 6379 # 切换已下线的主数据库 172.17.0.2 6379,选举 172.17.0.5 6379 为新的主数据库 1:X 26 Jun 2023 13:46:31.039 # +switch-master redis-master 172.17.0.2 6379 172.17.0.5 6379 # 重新构建主从关系 1:X 26 Jun 2023 13:46:31.040 * +slave slave 172.17.0.4:6379 172.17.0.4 6379 @ redis-master 172.17.0.5 6379 1:X 26 Jun 2023 13:46:31.040 * +slave slave 172.17.0.3:6379 172.17.0.3 6379 @ redis-master 172.17.0.5 6379 # 重新构建主从关系,原本的主数据库 172.17.0.2 6379 被降为从数据库 1:X 26 Jun 2023 13:46:31.040 * +slave slave 172.17.0.2:6379 172.17.0.2 6379 @ redis-master 172.17.0.5 6379 1:X 26 Jun 2023 13:46:31.044 # Could not rename tmp config file (Device or resource busy) 1:X 26 Jun 2023 13:46:31.044 # WARNING: Sentinel was not able to save the new configuration on disk!!!: Device or resource busy # 从库 172.17.0.2 6379 下线(但是不影响主库和其他从库和哨兵) 1:X 26 Jun 2023 13:47:01.083 # +sdown slave 172.17.0.2:6379 172.17.0.2 6379 @ redis-master 172.17.0.5 6379