VMware下CentOS6.8配置GFS文件系统(2)

[root@test02 ~]# ccs_tool create GFSmail
[root@test02
~]# ccs_tool addfence meatware fence_manual
[root@test02
~]# ccs_tool lsfence
Name            Agent
meatware        fence_manual
[root@test02
~]# ccs_tool addnode -n 11 -f meatware test01
[root@test02
~]# ccs_tool addnode -n 12 -f meatware test02
[root@test02
~]# ccs_tool lsnode
Cluster name: GFSmail, config_version:
4
Nodename                        Votes Nodeid Fencetype
test01                     
1  11    meatware
test02                     
1  12    meatware
[root@test02
~]#
[root@test02~]# rsync -avz /etc/cluster/cluster.conf root@test01
sending
incremental
file list
cluster.conf
sent
307 bytes  received 31 bytes  676.00 bytes/sec
total size is
557  speedup is 1.65
[root@test02
~]#

[root@test02 data]# cat /etc/cluster/cluster.conf <?xml version="1.0"?> <cluster name="GFSmail" config_version="4"> <clusternodes> <clusternode name="test01" votes="1" nodeid="11"><fence><method name="single"><device name="meatware"/></method></fence></clusternode><clusternode name="test02" votes="1" nodeid="12"><fence><method name="single"><device name="meatware"/></method></fence></clusternode></clusternodes> <fencedevices> <fencedevice name="meatware" agent="fence_manual"/></fencedevices> <rm> <failoverdomains/> <resources/> </rm> </cluster>

而后可以执行ccs_config_validate命令检查配置文件是否合法。

2.6创建集群存储

先手动启动cman和clvmd命令,以便监控集群卷的中存储设备的状态:

# service cman start # service clvmd start # service rgmanager start

以下操作在节点1端执行:

创建物理卷和卷组和逻辑卷:

[root@test01 ~]# pvcreate /dev/sdb

  Physical volume
"/dev/sdb" successfully created

[root@test01
~]# vgcreate mailcluster /dev/sdb

  Clustered volume group
"mailcluster" successfully created

[root@test01
~]# pvs

  PV        VG          Fmt  Attr PSize  PFree

 
/dev/sda2  vg_mail    lvm2 a--u 199.41g    0

  /dev/sdb  mailcluster lvm2 a--u  4.00t 4.00t

[root@test01
~]# lvcreate -n maildata -l 100%FREE mailcluster

  Logical volume
"maildata" created.

[root@test01
~]# lvs

  LV      VG          Attr      LSize  Pool Origin Data
%  Meta%  Move Log Cpy%Sync Convert

  maildata mailcluster
-wi-a-----  4.00t

  home    vg_mail   
-wi-ao----  80.00g

  root    vg_mail   
-wi-ao---- 115.41g

  swap    vg_mail   
-wi-ao----  4.00g

[root@test01
~]#

2.7在新建的逻辑卷上创建gfs2文件系统:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/b2eafb255936944468999c1269b49068.html