{"id":1653,"date":"2021-07-30T19:17:56","date_gmt":"2021-07-30T11:17:56","guid":{"rendered":"https:\/\/egonlin.com\/?p=1653"},"modified":"2022-04-26T13:24:48","modified_gmt":"2022-04-26T05:24:48","slug":"ceph%e9%83%a8%e7%bd%b2","status":"publish","type":"post","link":"https:\/\/egonlin.com\/?p=1653","title":{"rendered":"ceph\u90e8\u7f72"},"content":{"rendered":"<h1>\u5206\u5e03\u5f0f\u5b58\u50a8ceph\u90e8\u7f72\u7bc7<\/h1>\n<h2>1\u3001\u5b89\u88c5\u5b8c\u64cd\u4f5c\u7cfb\u7edf<\/h2>\n<pre><code class=\"language-bash\">\u955c\u50cf\uff1a\ncentos7.6\n\n\u955c\u50cf\u4e0b\u8f7d\u5730\u5740\uff1a\n\u94fe\u63a5: https:\/\/pan.baidu.com\/s\/1IuJ5mL5H__4M8U-TlGaxkg \u63d0\u53d6\u7801: 56c7<\/code><\/pre>\n<h2>2\u3001\u914d\u7f6e\u5b8c\u786c\u4ef6<\/h2>\n<p>\u5982\u679c\u7528\u7684\u662f\u771f\u673a\u90e8\u7f72\u7ebf\u4e0a\u73af\u5883<\/p>\n<ul>\n<li>\u786c\u4ef6\u914d\u7f6e\u8bf7\u53c2\u8003egon\u8001\u5e08\u7684\u9644\u4ef6\uff1a\u300a\u9644\u4ef61\uff1aDELL\u670d\u52a1\u5668\u914d\u7f6e\u300b<\/li>\n<li>ceph\u5b89\u88c5\u914d\u7f6e\u4ecb\u7ecd\u4e0e\u4f18\u5316\u89c1\uff1a\u300a\u9644\u4ef62\uff1aceph\u5b89\u88c5\u914d\u7f6e\u4ecb\u7ecd\u4e0e\u4e3b\u673a\u4f18\u5316\u300b<\/li>\n<\/ul>\n<p>\u5982\u679c\u7528\u7684\u662f\u865a\u62df\u673a\u5b9e\u9a8c\u6765\u8fdb\u884c\u6d4b\u8bd5\uff0c\u672c\u673a\u81f3\u5c1116G\u5185\u5b58<\/p>\n<pre><code class=\"language-bash\">admin\u8282\u70b9\uff1a1.5G\u5185\u5b58 2\u5757\u7f51\u5361\nmon01\uff1a   1.5G\u5185\u5b58 2\u5757\u7f51\u5361\nmon02\uff1a   1.5G\u5185\u5b58 2\u5757\u7f51\u5361\nmon03\uff1a   1.5G\u5185\u5b58 2\u5757\u7f51\u5361\n\nosd01 2G\u5185\u5b58 3\u5757\u7f51\u5361  3\u5757\u673a\u68b0\u76d8 3\u5757\u56fa\u6001\u76d8\nosd02 2G\u5185\u5b58 3\u5757\u7f51\u5361  3\u5757\u673a\u68b0\u76d8 3\u5757\u56fa\u6001\u76d8\nosd03 2G\u5185\u5b58 3\u5757\u7f51\u5361  3\u5757\u673a\u68b0\u76d8 3\u5757\u56fa\u6001\u76d8<\/code><\/pre>\n<p>\u865a\u62df\u673a\u5b9e\u9a8c\u73af\u5883\u8bf7\u6ce8\u610f\uff1a<\/p>\n<ul>\n<li>1\u3001\u9664\u4e86osd\u8282\u70b9\u5916\uff0c\u5176\u4ed6\u8282\u70b9\u7684\u786c\u76d8\u76d8\u4e0d\u8981\u6302\u592a\u591a\uff0c\u5426\u5219cpu\u5360\u7528\u8fc7\u591a\u5bfc\u81f4\u865a\u62df\u673a\u542f\u52a8\u4e0d\u4e86\uff0c\u56e0\u4e3a\u90fd\u662f\u865a\u62df\u51fa\u6765\u7684<\/li>\n<li>2\u3001\u865a\u62df\u78c1\u76d8\u7a7a\u95f4\u4e3a20G\u5373\u53ef<\/li>\n<li>3\u3001\u628a\u865a\u62df\u673a\u65e0\u5173\u7684\u786c\u4ef6\u90fd\u5220\u6389\uff0c\u6bd4\u5982usb\u3001\u58f0\u5361\u3001\u6253\u5370\u673a\u7b49<\/li>\n<\/ul>\n<h2>3\u3001\u7f51\u7edc\u89c4\u5212<\/h2>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\u4e3b\u673a<\/th>\n<th style=\"text-align: right;\">\u7ba1\u7406\u7f51\u7edc<\/th>\n<th style=\"text-align: center;\">public\u7f51\u7edc<\/th>\n<th>cluster\u7f51\u7edc<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">admin<\/td>\n<td style=\"text-align: right;\">192.168.70.3<\/td>\n<td style=\"text-align: center;\">1.1.1.3\/24<\/td>\n<td>\u65e0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">mon01<\/td>\n<td style=\"text-align: right;\">192.168.70.4<\/td>\n<td style=\"text-align: center;\">1.1.1.4\/24<\/td>\n<td>\u65e0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">mon02<\/td>\n<td style=\"text-align: right;\">192.168.70.5<\/td>\n<td style=\"text-align: center;\">1.1.1.5\/24<\/td>\n<td>\u65e0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">mon03<\/td>\n<td style=\"text-align: right;\">192.168.70.6<\/td>\n<td style=\"text-align: center;\">1.1.1.6\/24<\/td>\n<td>\u65e0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">osd01<\/td>\n<td style=\"text-align: right;\">192.168.70.7<\/td>\n<td style=\"text-align: center;\">1.1.1.7\/24<\/td>\n<td>2.2.2.7\/24<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">osd02<\/td>\n<td style=\"text-align: right;\">192.168.70.8<\/td>\n<td style=\"text-align: center;\">1.1.1.8\/24<\/td>\n<td>2.2.2.8\/24<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">osd03<\/td>\n<td style=\"text-align: right;\">192.168.70.9<\/td>\n<td style=\"text-align: center;\">1.1.1.9\/24<\/td>\n<td>2.2.2.9\/24<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6ce8\u610f\uff1a<\/p>\n<ul>\n<li>\u82e5\u662f\u751f\u4ea7\u73af\u5883\uff0c\u4e0a\u8ff0ip\u5fc5\u987b\u8bbe\u7f6e\u6210\u56fa\u5b9aip<\/li>\n<li>\u6ce8\u610f\u5173\u95edNetworkManager<\/li>\n<\/ul>\n<pre><code class=\"language-bash\">systemctl stop NetworkManager\nsystemctl disable NetworkManager<\/code><\/pre>\n<h2>4\u3001\u6bcf\u53f0\u673a\u5668\u5747\u5173\u95edselinux\u4e0e\u9632\u706b\u5899<\/h2>\n<pre><code class=\"language-bash\">sed -i &#039;s\/SELINUX=enforcing\/SELINUX=disabled\/&#039; \/etc\/sysconfig\/selinux\nsed -i &#039;s\/SELINUX=enforcing\/SELINUX=disabled\/&#039; \/etc\/selinux\/config\nsetenforce 0\nsystemctl stop firewalld.service\nsystemctl disable firewalld.service<\/code><\/pre>\n<h2>5\u3001\u6bcf\u53f0\u4e3b\u673a\u89c4\u8303\u4e3b\u673a\u540d<\/h2>\n<pre><code class=\"language-bash\"># \u6ce8\u610f\u4e3b\u673a\u540d\u4f1a\u5f71\u54cd\u540e\u7eed\u7684\u90e8\u7f72\uff0c\u4e00\u5b9a\u8981\u914d\u7f6e\u5bf9\uff0c\u4f9d\u6b21\u5728\u6bcf\u53f0\u673a\u5668\u4e0a\u8fd0\u884c\u5373\u53ef\nhostnamectl set-hostname admin\nhostnamectl set-hostname mon01\nhostnamectl set-hostname mon02\nhostnamectl set-hostname mon03\nhostnamectl set-hostname osd01\nhostnamectl set-hostname osd02\nhostnamectl set-hostname osd03<\/code><\/pre>\n<h2>6\u3001\u6bcf\u53f0\u4e3b\u673a\u5747\u5f00\u542fyum\u7f13\u5b58<\/h2>\n<pre><code class=\"language-bash\">sed -ri &#039;2c cachedir=\/soft&#039; \/etc\/yum.conf\nsed -ri &#039;3c keepcache=1&#039; \/etc\/yum.conf \nmkdir \/soft<\/code><\/pre>\n<p>\u6ce8\u610f\u6ce8\u610f\u6ce8\u610f\uff1ayum clean all\u4f1a\u5c06\u7f13\u5b58\u6587\u4ef6\u5939\u5185\u7f13\u5b58\u7684rpm\u5305\u90fd\u6e05\u7406\u6389\uff0c\u9700\u8981\u7279\u522b\u6ce8\u610f\u7684\u662f<\/p>\n<ul>\n<li>1\u3001\u5982\u679c\u4f60\u6253\u7b97\u91c7\u96c6rpm\u5305\uff0c\u7136\u540e\u5236\u4f5c\u6210\u81ea\u5df1\u7684yum\u6e90\uff0c\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u4e0d\u8981\u624b\u8d31\u6267\u884cyum clean all<\/li>\n<li>2\u3001ceph-deploy\u5728\u5b89\u88c5\u65f6\u4f1a\u6267\u884cyum clean all\u547d\u4ee4\uff0c\u7136\u540e\u518d\u6309\u7167\uff0c\u6240\u4ee5\u8bf7\u5728ceph-deploy install\u524d\u5c06\u4e00\u4e9b\u7f13\u5b58\u7684\u5305\u5907\u4efd\u597d<\/li>\n<\/ul>\n<p>Ps\uff1a\u5173\u95edyum\u81ea\u52a8\u66f4\u65b0<\/p>\n<pre><code class=\"language-bash\">\u9ed8\u8ba4\u4e0d\u4f1a\u5b89\u88c5yum-con\uff0c\u6211\u4eec\u4e5f\u65e0\u9700\u5173\u95edyum\u81ea\u52a8\u66f4\u65b0\n\u4f46\u5982\u679c\u4f60\u81ea\u5df1\u5b89\u88c5\u4e86\uff1ayum install yum-cron -y\uff0c\u5219\u4f1a\u9ed8\u8ba4\u5f00\u542fyum\u66f4\u65b0\uff0c\u8bf7\u8bb0\u5f97\u5173\u95ed\n# cat s\/etc\/yum\/yum-cron.conf\nupdate_messages = no\ndownload_updates = no<\/code><\/pre>\n<h2>7\u3001\u6bcf\u53f0\u673a\u5668\u5347\u7ea7\u64cd\u4f5c\u7cfb\u7edf\u5e76\u5b89\u88c5\u4f9d\u8d56\u5305<\/h2>\n<p>\u5982\u679c\u91c7\u7528\u7684\u4e0d\u662f\u5b98\u7f51\u6e90\uff0c\u800c\u662f\u81ea\u5b9a\u4e49\u7684yum\u6e90\uff0c\u90a3\u4e48<\/p>\n<p>\u4e0b\u8ff0\u547d\u4ee4\u4e2d\u5c31\u4e0d\u9700\u8981\u6267\u884cyum install epel-release -y\u5b89\u88c5epel\u6e90\u4e86\uff0c\u5207\u8bb0<\/p>\n<pre><code class=\"language-bash\">yum install epel-release -y &amp;&amp; yum update -y &amp;&amp; yum upgrade -y &amp;&amp; reboot<\/code><\/pre>\n<p>\u5347\u7ea7\u540e\u9700\u8981\u91cd\u542f\u8ba1\u7b97\u673a\u624d\u80fd\u52a0\u8f7d\u65b0\u5185\u6838\uff0c\u6ce8\u610f\uff0c\u4e00\u5b9a\u8981\u91cd\u542f\u8ba1\u7b97\u673a<\/p>\n<pre><code class=\"language-bash\"># \u5347\u7ea7\u524d\n\u7cfb\u7edf\uff1aCentOS Linux release 7.6.1810 (Core) \n\u5185\u6838\uff1a3.10.0-957.el7.x86_64  \n\n# reboot \u91cd\u542f\u540e\n\u7cfb\u7edf\uff1aCentOS Linux release 7.9.2009 (Core)\n\u5185\u6838\uff1a3.10.0-1160.24.1.el7.x86_64  # \u5347\u7ea7\u540e<\/code><\/pre>\n<h2>8\u3001\u6bcf\u53f0\u673a\u5668\u5747\u5b89\u88c5\u5e38\u7528\u8f6f\u4ef6<\/h2>\n<pre><code class=\"language-bash\">yum -y install python-setuptools python-pip gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel \\\nzlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel zip unzip ncurses ncurses-devel curl curl-devel e2fsprogs \\\ne2fsprogs-devel krb5-devel libidn libidn-devel openssl openssh openssl-devel nss_ldap openldap openldap-devel openldap-clients \\\nopenldap-servers libxslt-devel libevent-devel ntp libtool-ltdl bison libtool vim-enhanced python wget lsof iptraf strace lrzsz \\\nkernel-devel kernel-headers pam-devel tcl tk cmake ncurses-devel bison setuptool popt-devel net-snmp screen perl-devel \\\npcre-devel net-snmp screen tcpdump rsync sysstat man iptables sudo libconfig git  bind-utils \\\ntmux elinks numactl iftop bwm-ng net-tools expect<\/code><\/pre>\n<h2>9\u3001\u6bcf\u53f0\u673a\u5668\u5747\u914d\u7f6eceph\u6e90<\/h2>\n<p>\u5982\u679c\u7528\u7684\u662f\u81ea\u5df1\u7684yum\u6e90\uff0c\u5219\u65e0\u9700\u4e0b\u8ff0\u64cd\u4f5c<\/p><div id=\"rml_readmorelogin_placeholder\" style=\"position:relative;\"><div id=\"rml_fade_content\" style=\"position: absolute;\r\ntop:-10em;\r\nwidth:100%;\r\nheight:10em;\r\nbackground: -webkit-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -moz-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -o-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -ms-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\"><\/div><div class=\"wpf-controller aru_rml_from_in_post\" style=\"background-color:#eeeeee;border:5px solid #cce6ff;\" id=\"ARU_ReadMoreLogin_ReadMoreLoginController\"><h2 id=\"Header\">\u67e5\u770b\u66f4\u591a<\/h2><div id=\"Message\"><p>\u8054\u7cfb\u7ba1\u7406\u5458\u5fae\u4fe1tutu19192010\uff0c\u6ce8\u518c\u8d26\u53f7<\/p>\n<\/div><div id=\"StatusBarHeader\"><\/div><form id=\"ARU_ReadMoreLogin_ReadMoreLoginController\"><input name=\"post_id\" value=\"1653\" type=\"hidden\"\/><input name=\"_init_callback\" value=\"InitLogin\" type=\"hidden\"\/><input name=\"post_id\" value=\"1653\" type=\"hidden\"\/><input name=\"rt_ype\" value=\"1\" type=\"hidden\"\/><input name=\"nonce\" value=\"14f32f5d52\" type=\"hidden\"\/><input name=\"_wpnonce\" value=\"4f9ac12208\" type=\"hidden\"\/><input name=\"_controller\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginController\" type=\"hidden\"\/><input name=\"_proxy_controller\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginController\" type=\"hidden\"\/><input name=\"_view\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginView\" type=\"hidden\"\/><table class=\"wpf-table-placeholder\"><tbody class=\"wpf-table-placeholder\"><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\" width=\"400px\"><table class=\"wpf-table-placeholder\"><tbody class=\"wpf-table-placeholder\"><tr class=\"wpf-table-placeholder\"><th class=\"wpf-table-placeholder-input\"><label class=\"wpf-label\">Username:<\/label><\/th><\/tr><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\"><input class=\"regular-text text_input\" name=\"username\" value=\"\" type=\"text\"\/><\/td><\/tr><tr class=\"wpf-table-placeholder\"><th class=\"wpf-table-placeholder-input\"><label class=\"wpf-label\">Password:<\/label><\/th><\/tr><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\"><input class=\"regular-text text_input\" name=\"password\" value=\"\" type=\"password\"\/><\/td><\/tr><\/tbody><\/table><p class=\"wpf-table-placeholder submit\"><button class=\"wp_plugin_framework_ajax_button\" type=\"button\" style=\"background-color:#4D90FE;;color:#ffffff;;border:1px solid #3079ed;\" name=\"_event\" value=\"ButtonLogin\">Log in<\/button><\/p><\/td><td class=\"wpf-table-placeholder-input\"><\/td><\/tr><\/tbody><\/table><\/form><div id=\"ButtonStartRegister\"><a href=\"https:\/\/egonlin.com\/wp-login.php?action=register\">Register<\/a><\/div><div id=\"Link1\"><a href=\"https:\/\/egonlin.com\/wp-login.php?action=lostpassword\">Forgotten username or password?<\/a><\/div><div id=\"StatusBarFooter\"><\/div><\/div><\/div><div id=aru_remaining_content><\/div>","protected":false},"excerpt":{"rendered":"<p>\u5206\u5e03\u5f0f\u5b58\u50a8ceph\u90e8\u7f72\u7bc7 1\u3001\u5b89\u88c5\u5b8c\u64cd\u4f5c\u7cfb\u7edf \u955c\u50cf\uff1a centos7.6 \u955c\u50cf\u4e0b\u8f7d\u5730\u5740\uff1a \u94fe\u63a5: https: [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[187],"tags":[21,194,19,22,195,20],"_links":{"self":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/1653"}],"collection":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1653"}],"version-history":[{"count":0,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/1653\/revisions"}],"wp:attachment":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}