{"id":3345,"date":"2020-06-23T18:15:07","date_gmt":"2020-06-23T22:15:07","guid":{"rendered":"https:\/\/mohamede.com\/?p=3345"},"modified":"2020-06-23T18:15:07","modified_gmt":"2020-06-23T22:15:07","slug":"cephadm-so-long-ceph-deploy","status":"publish","type":"post","link":"https:\/\/mohamede.com\/?p=3345","title":{"rendered":"Cephadm: Good bye ceph-deploy"},"content":{"rendered":"<p>As you probably may know, ceph-deploy, the beloved deployment utility for CEPH, is <a href=\"https:\/\/ceph.readthedocs.io\/en\/latest\/install\/\">no longer maintained<\/a>. Cephadm is the new tool\/package to deploy CEPH clusters.<\/p>\n<p>CERN has a pretty good intro <a href=\"https:\/\/indico.cern.ch\/event\/898515\/attachments\/2011108\/3360279\/Ceph_Octopus__Orch.pdf\">PDF<\/a> to it.\u00a0 Cephadm includes many nice features including the ability to adopt running CEPH clusters.<\/p>\n<p>Two quick notes that&#8217;ll save you some time<\/p>\n<ul>\n<li>While adding hosts using the<\/li>\n<\/ul>\n<pre>ceph orch host add hostname<\/pre>\n<p>You need to specify the IP of the host as follows<\/p>\n<pre>ceph orch host add hostname IP.IP.IP.IP<\/pre>\n<p>if you get the following error, despite injecting the ssh keys correctly<\/p>\n<pre>Error ENOENT: Failed to connect to hostname (hostname).  Check that the host is reachable and accepts connections using the cephadm SSH key\nyou may want to run: \n&gt; ssh -F =(ceph cephadm get-ssh-config) -i =(ceph config-key get mgr\/cephadm\/ssh_identity_key) root@hostname<\/pre>\n<ul>\n<li>When adding OSDs<\/li>\n<\/ul>\n<p>If you are deploying a cluster with a &#8220;relatively&#8221; moderate number of OSDs per host, you may run into the following error scenario while using:<\/p>\n<pre> ceph orch apply osd --all-available-devices<\/pre>\n<p>The command basically adds the available hdds\/ssds to be part of your cluster. Under the hood, this is done by running a docker container that&#8217;s in charge of that OSD. Basically the following command is run<\/p>\n<pre>\/bin\/bash \/var\/lib\/ceph\/{FSID}\/osd.{NUM}\/unit.run<\/pre>\n<p>It does that for every available OSD in your hosts. You may find that some of the OSDs don&#8217;t start and are stuck in error start despite your efforts to use<\/p>\n<pre>ceph orch daemon restart osd.xx<\/pre>\n<p>If you dig deeper (by executing the docker shell directly or looking into the logs) , you will find the following self-explanatory error<\/p>\n<pre> \/var\/lib\/ceph\/osd\/ceph-xx\/block) _aio_start io_setup(2) failed with EAGAIN; try increasing \/proc\/sys\/fs\/aio-max-nr<\/pre>\n<p>The solution is simply to set the asynchronous non-blocking IO into a higher value using<\/p>\n<pre>sudo sysctl -w fs.aio-max-nr=1048576<\/pre>\n<p>If that solves your issue, apply it to sysctl.conf to persist<\/p>\n<p>Happy cephadmining \ud83d\ude42<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As you probably may know, ceph-deploy, the beloved deployment utility for CEPH, is no longer maintained. Cephadm is the new tool\/package to deploy CEPH clusters. CERN has a pretty good intro PDF to it.\u00a0 Cephadm includes many nice features including the ability to adopt running CEPH clusters. Two quick notes that&#8217;ll save you some time<a class=\"read-more \" href=\"https:\/\/mohamede.com\/?p=3345\" title=\"Read More\"> <span class=\"button default\">Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,10],"tags":[],"class_list":["post-3345","post","type-post","status-publish","format-standard","hentry","category-ceph","category-openstack"],"_links":{"self":[{"href":"https:\/\/mohamede.com\/index.php?rest_route=\/wp\/v2\/posts\/3345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mohamede.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohamede.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohamede.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohamede.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3345"}],"version-history":[{"count":0,"href":"https:\/\/mohamede.com\/index.php?rest_route=\/wp\/v2\/posts\/3345\/revisions"}],"wp:attachment":[{"href":"https:\/\/mohamede.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohamede.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohamede.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}