first commit

This commit is contained in:
iProbe 2022-10-18 16:59:37 +08:00
commit ba848e218d
1001 changed files with 152333 additions and 0 deletions

View file

@ -0,0 +1,174 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="tool" content="leanote-desktop-app">
<title>moosefs配置</title>
<style>
*{font-family:"lucida grande","lucida sans unicode",lucida,helvetica,"Hiragino Sans GB","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;}
body {
margin: 0;
}
/*公用文字样式*/
h1{font-size:30px}h2{font-size:24px}h3{font-size:18px}h4{font-size:14px}
.note-container{
width:850px;
margin:auto;
padding: 10px 20px;
box-shadow: 1px 1px 10px #eee;
}
#title {
margin: 0;
}
table {
margin-bottom: 16px;
border-collapse: collapse;
}
table th, table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
table th {
font-weight: bold;
}
table tr {
background-color: none;
border-top: 1px solid #ccc;
}
table tr:nth-child(2n) {
background-color: rgb(247, 247, 249);
}
.mce-item-table, .mce-item-table td, .mce-item-table th, .mce-item-table caption {
border: 1px solid #ddd;
border-collapse: collapse;
padding: 6px 13px;
}
blockquote {
border-left-width:10px;
background-color:rgba(128,128,128,0.05);
border-top-right-radius:5px;
border-bottom-right-radius:5px;
padding:15px 20px;
border-left:5px solid rgba(128,128,128,0.075);
}
blockquote p {
margin-bottom:1.1em;
font-size:1em;
line-height:1.45
}
blockquote ul:last-child,blockquote ol:last-child {
margin-bottom:0
}
pre {
padding: 18px;
background-color: #f7f7f9;
border: 1px solid #e1e1e8;
border-radius: 3px;
display: block;
}
code {
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
white-space: nowrap;
background-color: #f9f2f4;
border-radius: 4px;
}
.footnote {
vertical-align: top;
position: relative;
top: -0.5em;
font-size: .8em;
}
hr {
margin:2em 0
}
img {
max-width:100%
}
pre {
word-break:break-word
}
p,pre,pre.prettyprint,blockquote {
margin:0 0 1.1em
}
hr {
margin:2em 0
}
img {
max-width:100%
}
.sequence-diagram,.flow-chart {
text-align:center;
margin-bottom:1.1em
}
.sequence-diagram text,.flow-chart text {
font-size:15px !important;
font-family:"Source Sans Pro",sans-serif !important
}
.sequence-diagram [fill="#ffffff"],.flow-chart [fill="#ffffff"] {
fill:#f6f6f6
}
.sequence-diagram [stroke="#000000"],.flow-chart [stroke="#000000"] {
stroke:#3f3f3f
}
.sequence-diagram text[stroke="#000000"],.flow-chart text[stroke="#000000"] {
stroke:none
}
.sequence-diagram [fill="#000"],.flow-chart [fill="#000"],.sequence-diagram [fill="#000000"],.flow-chart [fill="#000000"],.sequence-diagram [fill="black"],.flow-chart [fill="black"] {
fill:#3f3f3f
}
ul,ol {
margin-bottom:1.1em
}
ul ul,ol ul,ul ol,ol ol {
margin-bottom:1.1em
}
kbd {
padding:.1em .6em;
border:1px solid rgba(63,63,63,0.25);
-webkit-box-shadow:0 1px 0 rgba(63,63,63,0.25);
box-shadow:0 1px 0 rgba(63,63,63,0.25);
font-size:.7em;
font-family:sans-serif;
background-color:#fff;
color:#333;
border-radius:3px;
display:inline-block;
margin:0 .1em;
white-space:nowrap
}
.toc ul {
list-style-type:none;
margin-bottom:15px
}
</style>
<!-- 该css供自定义样式 -->
<link href="../leanote-html.css" rel="stylesheet">
</head>
<body>
<div class="note-container">
<h1 class="title" id="leanote-title">moosefs配置</h1>
<div class="content-html" id="leanote-content"><p>master:10.188.12.129<br>metalogger:10.188.12.131<br>chunk:10.188.12.129,10.188.12.131,10.188.12.132<br>client:10.188.12.131,10.188.12.132</p><p>1、向包管理器添加相应的密钥(三台)<br></p><pre id="leanote_ace_1507616094105_0" class="brush:sh ace-tomorrow" data-mce-style="line-height: 1.5; font-size: 14px; height: 21px;">curl&nbsp;"http://ppa.moosefs.com/RPM-GPG-KEY-MooseFS"&nbsp;&gt;&nbsp;/etc/pki/rpm-gpg/RPM-GPG-KEY-MooseFS</pre><p>2、添加源<br></p><pre id="leanote_ace_1507616099755_0" class="brush:sh ace-tomorrow" data-mce-style="line-height: 1.5; font-size: 14px; height: 21px;">curl&nbsp;"http://ppa.moosefs.com/MooseFS-3-el6.repo"&nbsp;&gt;&nbsp;/etc/yum.repos.d/MooseFS.repo</pre><p>3、安装<br>①Master server10.188.12.129<br></p><pre id="leanote_ace_1507616110546_0" class="brush:sh ace-tomorrow" data-mce-style="line-height: 1.5; font-size: 14px; height: 21px;">yum&nbsp;install&nbsp;moosefs-master&nbsp;moosefs-cli&nbsp;moosefs-cgi&nbsp;moosefs-cgiserv</pre><p><br>②Chunkserver10.188.12.12910.188.12.131,10.188.12.132<br></p><pre id="leanote_ace_1507616118618_0" class="brush:sh ace-tomorrow" data-mce-style="line-height: 1.5; font-size: 14px; height: 21px;">yum&nbsp;install&nbsp;moosefs-chunkserver</pre><p><br>③Metaloggers10.188.12.129<br></p><pre id="leanote_ace_1507616126449_0" class="brush:sh ace-tomorrow" data-mce-style="line-height: 1.5; font-size: 14px; height: 21px;">yum&nbsp;install&nbsp;moosefs-metalogger</pre><p><br>④Clients10.188.12.131,10.188.12.132<br></p><pre id="leanote_ace_1507616135320_0" class="brush:sh ace-tomorrow" data-mce-style="line-height: 1.5; font-size: 14px; height: 21px;">yum&nbsp;install&nbsp;moosefs-client</pre><p><br>⑤fusefile system in userspace utilities.在系统启动的时候自动加载Moosefs<br></p><pre id="leanote_ace_1507616144738_0" class="brush:sh ace-tomorrow">yum&nbsp;install&nbsp;fuse</pre><p><br>添加条目到/etc/fstab<br></p><pre id="leanote_ace_1507616152899_0" class="brush:sh ace-tomorrow">mfsmount&nbsp;/mnt/mfs&nbsp;fuse&nbsp;defaults&nbsp;0&nbsp;0</pre><p>4、配置master<br>/etc/mfs/mfsmaster.cfg文件可以不用修改<br>/etc/mfs/mfsexports.cfg文件中注释掉第二行该行意思是所有主机都可以挂载到mfs的根分区添加<br></p><pre id="leanote_ace_1507616165701_0" class="brush:sh ace-tomorrow">10.188.12.129-10.188.12.132&nbsp;/&nbsp;rw,alldirs,maproot=0</pre><p>启动master:</p><pre id="leanote_ace_1507616173572_0" class="brush:sh ace-tomorrow">/etc/init.d/moosefs-master&nbsp;start</pre><p><br>启动cgi:</p><pre id="leanote_ace_1507616181096_0" class="brush:sh ace-tomorrow">/etc/init.d/moosefs-cgiserv&nbsp;start</pre><p>5、配置chunkserver<br>/etc/mfs/mfschunkserver.cfg添加MASTER_HOST = 10.188.12.129MASTER_PORT可不添加默认为9420<br>/etc/mfs/mfshdd.cfg添加元数据存放分区 /data/test1<br>启动chunk</p><pre id="leanote_ace_1507616198082_0" class="brush:sh ace-tomorrow">/etc/init.d/moosefs-chunkserver&nbsp;start</pre><p>6、配置metalogger<br>/etc/mfs/mfsmetalogger.cfg 添加MASTER_HOST = 10.188.12.129MASTER_PORT可不添加默认为9419<br>启动metalogger:</p><pre id="leanote_ace_1507616208554_0" class="brush:sh ace-tomorrow">/etc/init.d/moosefs-metalogger&nbsp;start</pre><p>7、client端挂载<br></p><pre id="leanote_ace_1507616221262_0" class="brush:sh ace-tomorrow">mfsmount&nbsp;/data/dev&nbsp;-H&nbsp;10.188.12.129</pre><pre id="leanote_ace_1507616228593_0" class="brush:sh ace-tomorrow">mfsmount&nbsp;/data/dev&nbsp;-H&nbsp;10.188.12.129&nbsp;-S&nbsp;/test&nbsp;&nbsp;(mfsexports.cfg中挂载目录是/test)</pre><p>&nbsp;<br></p><p><br data-mce-bogus="1"></p><p>问题:</p><p>master启动报错</p><pre id="leanote_ace_1507689508123_0" class="brush:sh ace-tomorrow">open files limit has been set to: 4096
working directory: /usr/mfs/
lockfile created and locked
initializing mfsmaster modules ...
exports file has been loaded
topology file has been loaded
loading metadata ...
can't find metadata.mfs - try using option '-a'
init: metadata manager failed !!!
error occured during initialization - exiting</pre><p>解决方案:</p><p>切换到/usr/mfs中</p><pre id="leanote_ace_1507689584496_0" class="brush:sh ace-tomorrow">mv metadata.mfs.back metadata.mfs </pre><p><br data-mce-bogus="1"></p></div>
</div>
<!-- 该js供其它处理 -->
<script src="../leanote-html.js"></script>
</body>
</html>