OCFS2 Cluster File System安装与配置.docx
- 文档编号:30017130
- 上传时间:2023-08-04
- 格式:DOCX
- 页数:38
- 大小:570.83KB
OCFS2 Cluster File System安装与配置.docx
《OCFS2 Cluster File System安装与配置.docx》由会员分享,可在线阅读,更多相关《OCFS2 Cluster File System安装与配置.docx(38页珍藏版)》请在冰豆网上搜索。
OCFS2ClusterFileSystem安装与配置
瑞世达科技(厦门)有限公司
OCFS2ClusterFileSystem安装与配置
目录
目录1
壹、安装准备3
软件环境3
系统Kernel3
配置ocfs2console4
开启console4
以root用户执行命令4
添加节点5
配置状态6
配置信任关系8
配置o2cb,设置心跳等信息13
格式化ocfs2盘20
关于mkfs.ocfs2参数33
关于mount.ocfs2参数35
o2cbconfigure说明36
修订记录一览表
文件版本
制订/修订者
修订的内容大纲
1.0(2010-09-10)
Spark
Initial
1、安装准备
软件环境
除tools-devel这个包,其它包为必安包,同时Kernel(2.6.9-89.0.0.0.1.ELsmp)也决定安装包的选择.
[root@a2~]#rpm-qa--last|grepocfs
ocfs2-tools-devel-1.2.7-1.el4Sat03Jul201008:
17:
49PMCST
ocfs2-2.6.9-89.0.0.0.1.ELsmp-1.2.9-1.el4Sat03Jul201007:
56:
19PMCST
ocfs2console-1.2.7-1.el4Sat03Jul201007:
55:
06PMCST
ocfs2-tools-1.2.7-1.el4Sat03Jul201007:
54:
05PMCST
系统Kernel
[root@a2~]#uname-a
Linuxa22.6.9-89.0.0.0.1.ELsmp#1SMPTueMay1904:
23:
49EDT2009i686i686i386GNU/Linux
配置ocfs2console
开启console
以root用户执行命令
ocfs2console
添加节点
输入各节点name及IP地址
配置状态
Afterapply,可以看到Active状态栏有变化
Afterapply当前节点产生了cluster.conf配置文件
[root@a2~]#cat/etc/ocfs2/cluster.conf
node:
ip_port=7777
ip_address=192.168.190.128
number=0
name=a1
cluster=ocfs2
node:
ip_port=7777
ip_address=192.168.190.129
number=1
name=a2
cluster=ocfs2
cluster:
node_count=2
name=ocfs2
[root@a2~]#
配置信任关系
在传播clusterconfig时,显示在配置RSA
[root@a2~]#ssh-keygen-trsa
Generatingpublic/privatersakeypair.
Enterfileinwhichtosavethekey(/root/.ssh/id_rsa):
Enterpassphrase(emptyfornopassphrase):
Entersamepassphraseagain:
Youridentificationhasbeensavedin/root/.ssh/id_rsa.
Yourpublickeyhasbeensavedin/root/.ssh/id_rsa.pub.
Thekeyfingerprintis:
48:
bf:
5a:
23:
d5:
fb:
51:
b6:
cd:
86:
57:
fe:
6b:
31:
96:
fcroot@a2
[root@a2~]#
[root@a2.ssh]#ll
total8
-rw-------1rootroot887Jul1017:
28id_rsa
-rw-r--r--1rootroot217Jul1017:
28id_rsa.pub
[root@a2.ssh]#catid_rsa.pub>>authorized_keys
[root@a2.ssh]#
[root@a1~]#ssh-keygen-trsa
Generatingpublic/privatersakeypair.
Enterfileinwhichtosavethekey(/root/.ssh/id_rsa):
Enterpassphrase(emptyfornopassphrase):
Entersamepassphraseagain:
Youridentificationhasbeensavedin/root/.ssh/id_rsa.
Yourpublickeyhasbeensavedin/root/.ssh/id_rsa.pub.
Thekeyfingerprintis:
c3:
75:
1f:
f9:
ef:
90:
fb:
97:
4d:
25:
df:
d6:
37:
46:
ae:
cdroot@a1
[root@a1.ssh]#ll
total12
-rw-------1rootroot883Jul1017:
29id_rsa
-rw-r--r--1rootroot217Jul1017:
29id_rsa.pub
-rw-r--r--1rootroot437Jul323:
00known_hosts
[root@a1.ssh]#
[root@a2.ssh]#scpauthorized_keysa1:
/root/.ssh/
root@a1'spassword:
authorized_keys100%2170.2KB/s00:
00
[root@a2.ssh]#ssha1date
SatJul1017:
30:
38CST2010
[root@a2.ssh]#
[root@a1.ssh]#catid_rsa.pub>>authorized_keys
[root@a1.ssh]#scpauthorized_keysa2:
/root/.ssh/
root@a2'spassword:
authorized_keys100%4340.4KB/s00:
00
[root@a1.ssh]#ssha2date
SatJul1017:
31:
28CST2010
[root@a1.ssh]#
配置完RSA后执行Propagate,会将当前的cluster.conf文件传送到其它节点
[root@a1.ssh]#ll/etc/ocfs2/cluster.conf
-rw-r--r--1rootroot226Jul1017:
31/etc/ocfs2/cluster.conf
[root@a1.ssh]#
[root@a2.ssh]#ll/etc/ocfs2/
total4
-rw-r--r--1rootroot226Jul1017:
25cluster.conf
[root@a2.ssh]#
这时o2cb状态已经是开启的
[root@a2.ssh]#/etc/init.d/o2cbstatus
Module"configfs":
Loaded
Filesystem"configfs":
Mounted
Module"ocfs2_nodemanager":
Loaded
Module"ocfs2_dlm":
Loaded
Module"ocfs2_dlmfs":
Loaded
Filesystem"ocfs2_dlmfs":
Mounted
CheckingO2CBclusterocfs2:
Online
Heartbeatdeadthreshold:
31
Networkidletimeout:
30000
Networkkeepalivedelay:
2000
Networkreconnectdelay:
2000
CheckingO2CBheartbeat:
Notactive
[root@a2.ssh]#
[root@a2.ssh]#/etc/init.d/o2cbenable
WritingO2CBconfiguration:
OK
O2CBclusterocfs2alreadyonline
[root@a2.ssh]#chkconfig--list|grepo2cb
o2cb0:
off1:
off2:
on3:
on4:
on5:
on6:
off
[root@a2.ssh]#/etc/init.d/o2cbstatus
Module"configfs":
Loaded
Filesystem"configfs":
Mounted
Module"ocfs2_nodemanager":
Loaded
Module"ocfs2_dlm":
Loaded
Module"ocfs2_dlmfs":
Loaded
Filesystem"ocfs2_dlmfs":
Mounted
CheckingO2CBclusterocfs2:
Online
Heartbeatdeadthreshold:
31
Networkidletimeout:
30000
Networkkeepalivedelay:
2000
Networkreconnectdelay:
2000
CheckingO2CBheartbeat:
Notactive
[root@a2.ssh]#
另一节点执行o2cbenable
这时另一节点因为没有执行o2cbenable,状态还缺少初始配置信息
[root@a1~]#/etc/init.d/o2cbstatus
Module"configfs":
Loaded
Filesystem"configfs":
Mounted
Module"ocfs2_nodemanager":
Loaded
Module"ocfs2_dlm":
Loaded
Module"ocfs2_dlmfs":
Loaded
Filesystem"ocfs2_dlmfs":
Mounted
CheckingO2CBclusterocfs2:
Offline
[root@a1~]#
[root@a1~]#chkconfig--list|grepo2cb
o2cb0:
off1:
off2:
on3:
on4:
on5:
on6:
off
^[[A[root@a1~]#chkconfig--list|grepocfs2
ocfs20:
off1:
off2:
on3:
on4:
on5:
on6:
off
[root@a1~]#
执行o2cbenable后状态出现
[root@a1~]#/etc/init.d/o2cbenable
WritingO2CBconfiguration:
OK
StartingO2CBclusterocfs2:
OK
[root@a1~]#/etc/init.d/o2cbstatus
Module"configfs":
Loaded
Filesystem"configfs":
Mounted
Module"ocfs2_nodemanager":
Loaded
Module"ocfs2_dlm":
Loaded
Module"ocfs2_dlmfs":
Loaded
Filesystem"ocfs2_dlmfs":
Mounted
CheckingO2CBclusterocfs2:
Online
Heartbeatdeadthreshold:
31
Networkidletimeout:
30000
Networkkeepalivedelay:
2000
Networkreconnectdelay:
2000
CheckingO2CBheartbeat:
Notactive
[root@a1~]#
[root@a1~]#chkconfig--list|grepo2cb
o2cb0:
off1:
off2:
on3:
on4:
on5:
on6:
off
[root@a1~]#chkconfig--list|grepocfs2
ocfs20:
off1:
off2:
on3:
on4:
on5:
on6:
off
[root@a1~]#
配置o2cb,设置心跳等信息
[root@a1~]#/etc/init.d/o2cbconfigure
ConfiguringtheO2CBdriver.
Thiswillconfiguretheon-bootpropertiesoftheO2CBdriver.
Thefollowingquestionswilldeterminewhetherthedriverisloadedon
boot.Thecurrentvalueswillbeshowninbrackets('[]').Hitting
willabort.
LoadO2CBdriveronboot(y/n)[y]:
Clustertostartonboot(Enter"none"toclear)[ocfs2]:
Specifyheartbeatdeadthreshold(>=7)[31]:
61
Specifynetworkidletimeoutinms(>=5000)[30000]:
Specifynetworkkeepalivedelayinms(>=1000)[2000]:
Specifynetworkreconnectdelayinms(>=2000)[2000]:
WritingO2CBconfiguration:
OK
O2CBclusterocfs2alreadyonline
[root@a1~]#/etc/init.d/o2cbstatus
Module"configfs":
Loaded
Filesystem"configfs":
Mounted
Module"ocfs2_nodemanager":
Loaded
Module"ocfs2_dlm":
Loaded
Module"ocfs2_dlmfs":
Loaded
Filesystem"ocfs2_dlmfs":
Mounted
CheckingO2CBclusterocfs2:
Online
Heartbeatdeadthreshold:
31
Networkidletimeout:
30000
Networkkeepalivedelay:
2000
Networkreconnectdelay:
2000
CheckingO2CBheartbeat:
Notactive
[root@a1~]#
需要重启o2cb服务,新的配置才生效
[root@a1~]#/etc/init.d/o2cbrestart
StoppingO2CBclusterocfs2:
OK
Unmountingocfs2_dlmfsfilesystem:
OK
Unloadingmodule"ocfs2_dlmfs":
OK
Unmountingconfigfsfilesystem:
OK
Unloadingmodule"configfs":
OK
Loadingmodule"configfs":
OK
Mountingconfigfsfilesystemat/config:
OK
Loadingmodule"ocfs2_nodemanager":
OK
Loadingmodule"ocfs2_dlm":
OK
Loadingmodule"ocfs2_dlmfs":
OK
Mountingocfs2_dlmfsfilesystemat/dlm:
OK
StartingO2CBclusterocfs2:
OK
[root@a1~]#/etc/init.d/o2cbstatus
Module"configfs":
Loaded
Filesystem"configfs":
Mounted
Module"ocfs2_nodemanager":
Loaded
Module"ocfs2_dlm":
Loaded
Module"ocfs2_dlmfs":
Loaded
Filesystem"ocfs2_dlmfs":
Mounted
CheckingO2CBclusterocfs2:
Online
Heartbeatdeadthreshold:
61
Networkidletimeout:
30000
Networkkeepalivedelay:
2000
Networkreconnectdelay:
2000
CheckingO2CBheartbeat:
Notactive
[root@a1~]#
[root@a2.ssh]#/etc/init.d/o2cbstatus
Module"configfs":
Loaded
Filesystem"configfs":
Mounted
Module"ocfs2_nodemanager":
Loaded
Module"ocfs2_dlm":
Loaded
Module"ocfs2_dlmfs":
Loaded
Filesystem"ocfs2_dlmfs":
Mounted
CheckingO2CBclusterocfs2:
Online
Heartbeatdeadthreshold:
31
Networkidletimeout:
30000
Networkkeepalivedelay:
2000
Networkreconnectdelay:
2000
CheckingO2CBheartbeat:
Notactive
[root@a2.ssh]#
[root@a1~]#/etc/init.d/o2cbrestart
StoppingO2CBclusterocfs2:
OK
Unmountingocfs2_dlmfsfilesystem:
OK
Unloadingmodule"ocfs2_dlmfs":
OK
Unmountingconfigfsfilesystem:
OK
Unloadingmodule"configfs":
OK
Loadingmodule"configfs":
OK
Mountingconfigfsfilesystemat/config:
OK
Loadingmodule"ocfs2_nodemanager":
OK
Loadingmodule"ocfs2_dlm":
OK
Loadingmodule"ocfs2_dlmfs":
OK
Mountingocfs2_dlmfsfilesystemat/dlm:
OK
StartingO2CBclusterocfs2:
OK
[root@a1~]#/etc/init.d/o2cbstatus
Module"configfs":
Loaded
Filesystem"configfs":
Mounted
Module"ocfs2_nodemanager":
Loaded
Module"ocfs2_dlm":
Loaded
Module"ocfs2_dlmfs":
Loaded
Filesystem"ocfs2_dlmfs":
Mounted
CheckingO2CBclusterocfs2:
Online
Heartbeatdeadthreshold:
61
Networkidletimeout:
30000
Networkkeepalivedelay:
2000
Networkreconnectdelay:
2000
CheckingO2CBheartbeat:
Notactive
[root@a1~]#
另一节点也要配置
[root@a2.ssh]#/etc/init.d/o2cbconfigure
ConfiguringtheO2CBdriver.
Thiswillconfiguretheon-bootpropertiesoftheO2CBdriver.
Thefollowingquestionswilldeterminewhetherthedriverisloadedon
boot.Thecurrentvalueswillbeshowninbrackets('[]').Hitting
willabort.
LoadO2CBdriveronboot(y/n)[y]:
Clustertostartonboot(Enter"none"toclear)[ocfs2]:
Specifyheartbeatdeadthreshold(>=7)[31]:
61
Specifynetworkidletimeoutinms(>=5000)[30000]:
Specifynetworkkeepalivedelayinms(>=1000)[2000]:
Specifynetworkreconnectdelayinms(>=2000)[2000]:
WritingO2CBconfiguration:
OK
O2CBclusterocfs2alreadyonline
[ro
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- OCFS2 Cluster File System安装与配置 System 安装 配置