{"id":1652,"date":"2017-07-12T14:22:20","date_gmt":"2017-07-12T19:22:20","guid":{"rendered":"http:\/\/www.shainmiley.com\/wordpress\/?p=1652"},"modified":"2019-02-04T20:52:26","modified_gmt":"2019-02-05T01:52:26","slug":"replace-failed-ceph-disk-on-dell-hardware","status":"publish","type":"post","link":"https:\/\/www.shainmiley.com\/wordpress\/2017\/07\/12\/replace-failed-ceph-disk-on-dell-hardware\/","title":{"rendered":"Replace failed Ceph disk on Dell hardware"},"content":{"rendered":"<p>We are using Dell 720 and 730xd servers for our Ceph OSD servers. Here is the process that we use in order to replace a disk and\/or remove the faulty OSD from service.<\/p>\n<p>In this example we will attempt to replace OSD #45 (slot #9 of this particular server):<\/p>\n<p><strong>Stop the OSD and unmount the directory:<\/strong><br \/>\n<code>stop ceph-osd id=45<\/code><br \/>\n<code>umount \/var\/lib\/ceph\/osd\/ceph-45<\/code><br \/>\n<code>ceph osd crush reweight osd.num 0.0<\/code> (wait for the cluster to rebalance):<br \/>\n<code>ceph osd out osd.num<\/code><br \/>\n<code>service ceph stop osd.num<\/code><br \/>\n<code>ceph osd crush remove osd.num<\/code><br \/>\n<code>ceph auth del osd.num<\/code><br \/>\n<code>ceph osd rm osd.num<\/code><\/p>\n<p><code>megacli -PDList -a0<\/code><\/p>\n<p><strong>If not already offline&#8230;offline the drive:<\/strong><br \/>\n<code>megacli -pdoffline -physdrv[32:9] -a0<\/code><br \/>\n<strong>Mark disk as missing:<\/strong><br \/>\n<code>megacli -pdmarkmissing -physdrv[32:9] -a0<\/code><br \/>\n<strong>Permanently remove drive from array:<\/strong><br \/>\n<code>megacli -pdprprmv -physdrv[32:9] -a0<\/code><\/p>\n<p><strong>NOW PHYSICALLY REPLACE THE BAD THE DRIVE WITH A NEW ONE.<\/strong><\/p>\n<p><strong>Set drive state to online if not already:<\/strong><br \/>\n<code>megacli -PDOnline -PhysDrv [32:9] -a0<\/code><br \/>\n<strong>Create Raid-0 array on new drive:<\/strong><br \/>\n<code>megacli -CfgLdAdd -r0[32:9] -a0<\/code><\/p>\n<p><strong>You may need to discard the cache before doing the last step: <\/strong><br \/>\n<strong>First get cache lsit:<\/strong><br \/>\n<code>megacli -GetPreservedCacheList -a0<\/code><br \/>\n<strong>Clear whichover one you need to:<\/strong><br \/>\n<code>megacli -DiscardPreservedCache -L2 -a0<\/code><\/p>\n<p><strong>Recreate OSD using Bluestore as the new default<\/strong><br \/>\n<code>ceph-deploy disk zap hqosdNUM \/dev\/sdx<\/code><br \/>\n<code>ceph-deploy osd create --data \/dev\/sdm hqosdNUM<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are using Dell 720 and 730xd servers for our Ceph OSD servers. Here is the process that we use in order to replace a disk and\/or remove the faulty OSD from service. In this example we will attempt to replace OSD #45 (slot #9 of this particular server): Stop the OSD and unmount the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[35,36,3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/posts\/1652"}],"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=1652"}],"version-history":[{"count":4,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/posts\/1652\/revisions"}],"predecessor-version":[{"id":1689,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/posts\/1652\/revisions\/1689"}],"wp:attachment":[{"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1652"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1652"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1652"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}