{"id":1075,"date":"2015-09-15T09:59:37","date_gmt":"2015-09-15T07:59:37","guid":{"rendered":"https:\/\/elkano.org\/blog\/?p=1075"},"modified":"2015-09-16T15:18:56","modified_gmt":"2015-09-16T13:18:56","slug":"pg-x-y-stuck-stale-current-state-staleactiveclean-acting-n","status":"publish","type":"post","link":"https:\/\/elkano.org\/blog\/pg-x-y-stuck-stale-current-state-staleactiveclean-acting-n\/","title":{"rendered":"pg X.Y is stuck stale for , current state stale+active+clean, last acting [N]"},"content":{"rendered":"<p>I got these states when I removed the last OSD assigned to a pool  with size 1 in the crushmap. Of course, I didn&#8217;t have any precious data in it, but to avoid removing the pool I tried reassigning the pool to a new root and new OSDs through a the crusmap rule.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-linenumbers=\"false\">ceph health detail\r\nHEALTH_WARN 9 pgs stale; 9 pgs stuck stale\r\npg 18.6 is stuck stale for 8422.941233, current state stale+active+clean, last acting [13]\r\npg 18.1 is stuck stale for 8422.941247, current state stale+active+clean, last acting [13]\r\npg 19.0 is stuck stale for 8422.941251, current state stale+active+clean, last acting [13]\r\npg 18.0 is stuck stale for 8422.941252, current state stale+active+clean, last acting [13]\r\npg 19.1 is stuck stale for 8422.941255, current state stale+active+clean, last acting [13]\r\npg 18.3 is stuck stale for 8422.941254, current state stale+active+clean, last acting [13]\r\npg 19.2 is stuck stale for 8422.941258, current state stale+active+clean, last acting [13]\r\npg 18.2 is stuck stale for 8422.941259, current state stale+active+clean, last acting [13]\r\npg 19.3 is stuck stale for 8422.941263, current state stale+active+clean, last acting [13]\r\n<\/pre>\n<p>The Pgs show that the their last acting and removed OSD was number 13 and indeed, this OSD no longer exists in the cluster.<\/p>\n<p>If I try querying the pg:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-linenumbers=\"false\"># ceph pg 18.6 query\r\nError ENOENT: i don&#039;t have pgid 18.6\r\n<\/pre>\n<p>The data insight those pgs is not valid so I tried recreating the pg:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-linenumbers=\"false\"># ceph pg force_create_pg 18.6\r\npg 18.6 now creating, ok\r\n<\/pre>\n<p>Remember that I reassigned the pool to a new root in the crushmap, so there are many OSDs available for the pool. But now, the PG is stuck with the state &#8220;creating&#8221; forever:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-linenumbers=\"false\">pg 18.6 is stuck inactive since forever, current state creating, last acting []\r\n<\/pre>\n<p>I supposed that the problem was with the Pg number of the pool, I thought that the pool couldn&#8217;t create more PGs because of the its Pg number.<br \/>\nI tried increasing the pool pg number and finally the PGs where created ok.<\/p>\n<p>I follow these steps for documentation purposes, but if you don&#8217;t mind the data insight the pool the best option should be remove the pool and create it again.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got these states when I removed the last OSD assigned to a pool with size 1 in the crushmap. Of course, I didn&#8217;t have any precious data in it, but to avoid removing the pool I tried reassigning the pool to a new root and new OSDs through a the crusmap rule. ceph health [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[121],"_links":{"self":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/1075"}],"collection":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/comments?post=1075"}],"version-history":[{"count":8,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/1075\/revisions"}],"predecessor-version":[{"id":1083,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/1075\/revisions\/1083"}],"wp:attachment":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/media?parent=1075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/categories?post=1075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/tags?post=1075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}