{"id":1655,"date":"2017-07-12T15:06:06","date_gmt":"2017-07-12T20:06:06","guid":{"rendered":"http:\/\/www.shainmiley.com\/wordpress\/?p=1655"},"modified":"2019-02-04T20:57:34","modified_gmt":"2019-02-05T01:57:34","slug":"upgrading-ceph-from-hammer-to-jewel","status":"publish","type":"post","link":"https:\/\/www.shainmiley.com\/wordpress\/2017\/07\/12\/upgrading-ceph-from-hammer-to-jewel\/","title":{"rendered":"Upgrading Ceph from Hammer to Jewel"},"content":{"rendered":"<p>We recently upgraded our Ceph cluster from the latest version of Hammer to 10.2.7 (Jewel). Here are the steps that we used in order to complete the upgrade. Due to a change in Ceph daemon permissions, this specific upgrade required an additional step of using chmod to change file permissions for each daemon directory.<\/p>\n<p><strong>Set the cluster to the &#8216;noout&#8217; state so that we can perform the upgrade without any data movement:<\/strong><br \/>\n<code>ceph osd set noout<\/code><\/p>\n<p><strong>From the Ceph-deploy control node upgrade monitor nodes first:<\/strong><br \/>\n<code>ceph-deploy install --release jewel ceph-mon1 ceph-mon2 ceph-mon3<\/code><\/p>\n<p><strong>On each monitor node:<\/strong><br \/>\n<code>stop ceph-mon-all<\/code><br \/>\n<code>cd \/var\/lib\/ceph<\/code><br \/>\n<code>chown -R ceph:ceph \/var\/lib\/ceph\/<\/code><br \/>\n<code>start ceph-mon-all<\/code><\/p>\n<p><strong>Next move on to the OSD nodes:<\/strong><br \/>\n<code>ceph-deploy install --release jewel ceph-osd1 ceph-osd2 ceph-osd3 ceph-osd4<\/code><br \/>\n<strong><br \/>\nAdd the following line to \/etc\/ceph\/ceph.conf on each OSD (this will allow the ceph daemons to startup using the old permission scheme):<\/strong><br \/>\n<code>setuser match path = \/var\/lib\/ceph\/$type\/$cluster-$id<\/code><\/p>\n<p><strong>Stop OSD&#8217;s and restart them on each node:<\/strong><br \/>\n<code>stop ceph-osd-all<\/code><br \/>\n<code>start ceph-osd-all<\/code><\/p>\n<p><strong>Don&#8217;t forget to unset noout from the admin node:<\/strong><br \/>\n<code>ceph osd unset noout<\/code><\/p>\n<p><strong>Once the cluster is all healthy again and you have some time make the necessary permission changes for the OSD daemons you can do the following:<\/strong><\/p>\n<p><strong>Set noout:<\/strong><br \/>\n<code>ceph osd set noout<\/code><\/p>\n<p><strong>Log onto to each OSD node 1 at a time and run the following commands:<\/strong><br \/>\n<code>find \/var\/lib\/ceph\/osd -maxdepth 1 -mindepth 1 -print | xargs -P12 -n1 chown -R root:root<\/code><\/p>\n<p><code>stop ceph-osd-all<\/code><\/p>\n<p><code>find \/var\/lib\/ceph\/osd -maxdepth 1 -mindepth 1 -print | xargs -P12 -n1 chown -R ceph:ceph<\/code><\/p>\n<p><code>chown -R ceph:ceph \/var\/lib\/ceph\/<\/code><\/p>\n<p><strong>Comment out the setuser line in ceph.conf and restart OSD&#8217;s:<\/strong><br \/>\n<code>#setuser match path = \/var\/lib\/ceph\/$type\/$cluster-$id<\/code><br \/>\n<code>start ceph-osd-all<\/code><\/p>\n<p><strong>Don&#8217;t forget to unset noout from the admin node:<\/strong><br \/>\n<code>ceph osd unset noout<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We recently upgraded our Ceph cluster from the latest version of Hammer to 10.2.7 (Jewel). Here are the steps that we used in order to complete the upgrade. Due to a change in Ceph daemon permissions, this specific upgrade required an additional step of using chmod to change file permissions for each daemon directory. Set [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[35,3,23],"tags":[],"_links":{"self":[{"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/posts\/1655"}],"collection":[{"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1655"}],"version-history":[{"count":13,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/posts\/1655\/revisions"}],"predecessor-version":[{"id":1694,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/posts\/1655\/revisions\/1694"}],"wp:attachment":[{"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}