{"id":211076,"date":"2021-02-17T09:42:37","date_gmt":"2021-02-17T01:42:37","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=211076"},"modified":"2021-02-02T16:43:14","modified_gmt":"2021-02-02T08:43:14","slug":"ceph-pg-unfound","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/ceph-pg-unfound.html","title":{"rendered":"Ceph pg unfound\u5904\u7406\u8fc7\u7a0b\u8be6\u89e3"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u4eca\u5929\u68c0\u67e5ceph\u96c6\u7fa4\uff0c\u53d1\u73b0\u6709pg\u4e22\u5931,\u672c\u6587\u5c31\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u4e00\u4e0b\u89e3\u51b3\u65b9\u6cd5\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
1.\u67e5\u770b\u96c6\u7fa4\u72b6\u6001<\/strong><\/div>\n
[root@k8snode001\u00a0~]#\u00a0ceph\u00a0health\u00a0detail\r\nHEALTH_ERR\u00a01\/973013\u00a0objects\u00a0unfound\u00a0(0.000%);\u00a017\u00a0scrub\u00a0errors;\u00a0Possible\u00a0data\u00a0damage:\u00a01\u00a0pg\u00a0recovery_unfound,\u00a08\u00a0pgs\u00a0inconsistent,\u00a01\u00a0pg\u00a0repair;\u00a0Degraded\u00a0data\u00a0redundancy:\u00a01\/2919039\u00a0objects\u00a0degraded\u00a0(0.000%),\u00a01\u00a0pg\u00a0degraded\r\nOBJECT_UNFOUND\u00a01\/973013\u00a0objects\u00a0unfound\u00a0(0.000%)\r\n\u00a0\u00a0\u00a0\u00a0pg\u00a02.2b\u00a0has\u00a01\u00a0unfound\u00a0objects\r\nOSD_SCRUB_ERRORS\u00a017\u00a0scrub\u00a0errors\r\nPG_DAMAGED\u00a0Possible\u00a0data\u00a0damage:\u00a01\u00a0pg\u00a0recovery_unfound,\u00a08\u00a0pgs\u00a0inconsistent,\u00a01\u00a0pg\u00a0repair\r\n\u00a0\u00a0\u00a0\u00a0pg\u00a02.2b\u00a0is\u00a0active+recovery_unfound+degraded,\u00a0acting\u00a0[14,22,4],\u00a01\u00a0unfound\r\n\u00a0\u00a0\u00a0\u00a0pg\u00a02.44\u00a0is\u00a0active+clean+inconsistent,\u00a0acting\u00a0[14,8,21]\r\n\u00a0\u00a0\u00a0\u00a0pg\u00a02.73\u00a0is\u00a0active+clean+inconsistent,\u00a0acting\u00a0[25,14,8]\r\n\u00a0\u00a0\u00a0\u00a0pg\u00a02.80\u00a0is\u00a0active+clean+scrubbing+deep+inconsistent+repair,\u00a0acting\u00a0[4,8,14]\r\n\u00a0\u00a0\u00a0\u00a0pg\u00a02.83\u00a0is\u00a0active+clean+inconsistent,\u00a0acting\u00a0[14,13,6]\r\n\u00a0\u00a0\u00a0\u00a0pg\u00a02.ae\u00a0is\u00a0active+clean+inconsistent,\u00a0acting\u00a0[14,3,2]\r\n\u00a0\u00a0\u00a0\u00a0pg\u00a02.c4\u00a0is\u00a0active+clean+inconsistent,\u00a0acting\u00a0[8,21,14]\r\n\u00a0\u00a0\u00a0\u00a0pg\u00a02.da\u00a0is\u00a0active+clean+inconsistent,\u00a0acting\u00a0[23,14,15]\r\n\u00a0\u00a0\u00a0\u00a0pg\u00a02.fa\u00a0is\u00a0active+clean+inconsistent,\u00a0acting\u00a0[14,23,25]\r\nPG_DEGRADED\u00a0Degraded\u00a0data\u00a0redundancy:\u00a01\/2919039\u00a0objects\u00a0degraded\u00a0(0.000%),\u00a01\u00a0pg\u00a0degraded\r\n\u00a0\u00a0\u00a0\u00a0pg\u00a02.2b\u00a0is\u00a0active+recovery_unfound+degraded,\u00a0acting\u00a0[14,22,4],\u00a01\u00a0unfound<\/pre>\n

\u4ece\u8f93\u51fa\u53d1\u73b0pg 2.2b is active+recovery_unfound+degraded, acting [14,22,4], 1 unfound<\/p>\n

\u73b0\u5728\u6211\u4eec\u6765\u67e5\u770bpg 2.2b\uff0c\u770b\u770b\u8fd9\u4e2apg\u7684\u60f3\u60f3\u4fe1\u606f\u3002<\/p>\n

[root@k8snode001\u00a0~]#\u00a0ceph\u00a0pg\u00a0dump_json\u00a0pools\u00a0\u00a0\u00a0\u00a0|grep\u00a02.2b\r\ndumped\u00a0all\r\n2.2b\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a02487\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a00\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01\u00a0\u00a09533198403\u00a03048\u00a0\u00a0\u00a0\u00a0\u00a03048\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0active+recovery_unfound+degraded\u00a02020-07-23\u00a008:56:07.669903\u00a0\u00a010373'5448370\u00a0\u00a010373:7312614\u00a0\u00a0[14,22,4]\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a014\u00a0\u00a0[14,22,4]\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a014\u00a0\u00a010371'5437258\u00a02020-07-23\u00a008:56:06.637012\u00a0\u00a0\u00a010371'5437258\u00a02020-07-23\u00a008:56:06.637012\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a00<\/pre>\n

\u53ef\u4ee5\u770b\u5230\u5b83\u73b0\u5728\u53ea\u6709\u4e00\u4e2a\u526f\u672c<\/p>\n

2.\u67e5\u770bpg map<\/strong><\/div>\n
[root@k8snode001\u00a0~]#\u00a0ceph\u00a0pg\u00a0map\u00a02.2b\r\nosdmap\u00a0e10373\u00a0pg\u00a02.2b\u00a0(2.2b)\u00a0->\u00a0up\u00a0[14,22,4]\u00a0acting\u00a0[14,22,4]<\/pre>\n

\u4ecepg map\u53ef\u4ee5\u770b\u51fa\uff0cpg 2.2b\u5206\u5e03\u5230osd [14,22,4]\u4e0a<\/p>\n

3.\u67e5\u770b\u5b58\u50a8\u6c60\u72b6\u6001<\/strong><\/div>\n
[root@k8snode001\u00a0~]#\u00a0ceph\u00a0osd\u00a0pool\u00a0stats\u00a0k8s-1\r\npool\u00a0k8s-1\u00a0id\u00a02\r\n\u00a0\u00a01\/1955664\u00a0objects\u00a0degraded\u00a0(0.000%)\r\n\u00a0\u00a01\/651888\u00a0objects\u00a0unfound\u00a0(0.000%)\r\n\u00a0\u00a0client\u00a0io\u00a0271\u00a0KiB\/s\u00a0wr,\u00a00\u00a0op\/s\u00a0rd,\u00a052\u00a0op\/s\u00a0wr\r\n\u00a0\r\n[root@k8snode001\u00a0~]#\u00a0ceph\u00a0osd\u00a0pool\u00a0ls\u00a0detail|grep\u00a0k8s-1\r\npool\u00a02\u00a0'k8s-1'\u00a0replicated\u00a0size\u00a03\u00a0min_size\u00a01\u00a0crush_rule\u00a00\u00a0object_hash\u00a0rjenkins\u00a0pg_num\u00a0256\u00a0pgp_num\u00a0256\u00a0last_change\u00a088\u00a0flags\u00a0hashpspool,selfmanaged_snaps\u00a0stripe_width\u00a00\u00a0application\u00a0rbd<\/pre>\n
4.\u5c1d\u8bd5\u6062\u590dpg 2.2b\u4e22\u5931\u5730\u5757<\/strong><\/div>\n
[root@k8snode001\u00a0~]#\u00a0ceph\u00a0pg\u00a0repair\u00a02.2b<\/pre>\n

\u5982\u679c\u4e00\u76f4\u4fee\u590d\u4e0d\u6210\u529f\uff0c\u53ef\u4ee5\u67e5\u770b\u5361\u4f4fPG\u7684\u5177\u4f53\u4fe1\u606f\uff0c\u4e3b\u8981\u5173\u6ce8recovery_state\uff0c\u547d\u4ee4\u5982\u4e0b<\/p>\n

[root@k8snode001\u00a0~]#\u00a0ceph\u00a0pg\u00a02.2b\u00a0\u00a0query\r\n{\r\n\u00a0\u00a0\u00a0\u00a0\"......\r\n\u00a0\u00a0\u00a0\u00a0\"recovery_state\":\u00a0[\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"name\":\u00a0\"Started\/Primary\/Active\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"enter_time\":\u00a0\"2020-07-21\u00a014:17:05.855923\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"might_have_unfound\":\u00a0[],\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"recovery_progress\":\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"backfill_targets\":\u00a0[],\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"waiting_on_backfill\":\u00a0[],\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"last_backfill_started\":\u00a0\"MIN\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"backfill_info\":\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"begin\":\u00a0\"MIN\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"end\":\u00a0\"MIN\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"objects\":\u00a0[]\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0},\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"peer_backfill_info\":\u00a0[],\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"backfills_in_flight\":\u00a0[],\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"recovering\":\u00a0[],\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"pg_backend\":\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"pull_from_peer\":\u00a0[],\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"pushing\":\u00a0[]\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0},\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"scrub\":\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"scrubber.epoch_start\":\u00a0\"10370\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"scrubber.active\":\u00a0false,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"scrubber.state\":\u00a0\"INACTIVE\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"scrubber.start\":\u00a0\"MIN\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"scrubber.end\":\u00a0\"MIN\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"scrubber.max_end\":\u00a0\"MIN\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"scrubber.subset_last_update\":\u00a0\"0'0\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"scrubber.deep\":\u00a0false,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"scrubber.waiting_on_whom\":\u00a0[]\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0},\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"name\":\u00a0\"Started\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"enter_time\":\u00a0\"2020-07-21\u00a014:17:04.814061\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\r\n\u00a0\u00a0\u00a0\u00a0],\r\n\u00a0\u00a0\u00a0\u00a0\"agent_state\":\u00a0{}\r\n}<\/pre>\n

\u5982\u679crepair\u4fee\u590d\u4e0d\u4e86;\u4e24\u79cd\u89e3\u51b3\u65b9\u6848\uff0c\u56de\u9000\u65e7\u7248\u6216\u8005\u76f4\u63a5\u5220\u9664<\/p>\n

5.\u89e3\u51b3\u65b9\u6848<\/strong><\/div>\n
\u56de\u9000\u65e7\u7248\r\n[root@k8snode001\u00a0~]#\u00a0ceph\u00a0pg\u00a0\u00a02.2b\u00a0\u00a0mark_unfound_lost\u00a0revert\r\n\u76f4\u63a5\u5220\u9664\r\n[root@k8snode001\u00a0~]#\u00a0ceph\u00a0pg\u00a0\u00a02.2b\u00a0\u00a0mark_unfound_lost\u00a0delete<\/pre>\n
6.\u9a8c\u8bc1<\/strong><\/div>\n

\u6211\u8fd9\u91cc\u76f4\u63a5\u5220\u9664\u4e86\uff0c\u7136\u540eceph\u96c6\u7fa4\u91cd\u5efapg,\u7a0d\u7b49\u4f1a\u518d\u770b\uff0cpg\u72b6\u6001\u53d8\u4e3aactive+clean<\/p>\n

[root@k8snode001\u00a0~]#\u00a0\u00a0ceph\u00a0pg\u00a0\u00a02.2b\u00a0query\u00a0\r\n{\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\"state\":\u00a0\"active+clean\",\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\"snap_trimq\":\u00a0\"[]\",\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\"snap_trimq_len\":\u00a00,\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\"epoch\":\u00a011069,\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\"up\":\u00a0[\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a012,\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a022,\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a04\u00a0\r\n\u00a0\u00a0\u00a0\u00a0],<\/pre>\n

\u518d\u6b21\u67e5\u770b\u96c6\u7fa4\u72b6\u6001<\/p>\n

[root@k8snode001\u00a0~]#\u00a0ceph\u00a0health\u00a0detail\u00a0\r\nHEALTH_OK<\/pre>\n","protected":false},"excerpt":{"rendered":"

[root@k8snode001\u00a0~]#\u00a0ceph\u00a0health\u00a0detail HEALTH_ERR\u00a01\/97 […]<\/p>\n","protected":false},"author":323,"featured_media":202755,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-211076","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/211076","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/323"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=211076"}],"version-history":[{"count":1,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/211076\/revisions"}],"predecessor-version":[{"id":211077,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/211076\/revisions\/211077"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/202755"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=211076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=211076"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=211076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}