注意:
如果想实现用户认证,必须先打开IP认证。
取消此前的操作:
1 | # iscsiadm -m node -T iqn.2013-05.com:teststore.disk1 -p 172.16.100.100 -u 登出 |
1 | # vim /etc/iscsi/iscsid.conf |
initiator机装:
1 | # ha ssh node $I 'yum -y install cman rgmanager gfs2-utils' |
mkfs.gfs2:
-b 块文件大小
-j :指定日志区域的个数,有几个就能被几个节点挂载;
-J #MB: 指定日志文件大小,默认为128M;
-p :锁协议的名称
lock_dlm :分布式日志文件锁
lock_nolock}:不使用锁
-t:锁表的名称,格式为clustername:locktablename,clustername为当前节点所在的集群的名称,locktablename要在集群唯一; gfs2_jadd :
gfs2_jadd -j 3 /dev/sdc2
可以用来调整日志区域的个数
3表示的是在原来的基础上再增加3个...gfs2_tool:
gfs2_tool journals /dev/sdc2
mkfs.gfs2 -j 2 -p lock_dlm -t tcluster:mysqlstore /dev/sdc2
如果失败:
fs is for a different cluster error mounting lockproto lock_dlm
则表示:
1、cman没有启动,可以使用clustat进行查看;如果正常,则只可能错误出现在一个地方,格式化那步出错:
successfully use “lock_dlm”, the kernel’s DLM subsystem must be up and running, which requires that you must have set up a basic cluster configuration: a cluster with no services defined yet, but with heartbeat and fencing configured and running.
Normally the gfs_controld daemon starts along with other cluster daemons when you run “service cman start”. Looks like your cman start-up has not been successful. You should fix that first.
可以看总结…………
在另外一个节点上挂载:
1 | # mount -t gfs2 /dev/sdc2 /mnt |