#aptitude install gfs-tools cman clvm
Configure GFS cluster: (note: change name= and IPADDR= )
#vim /etc/cluster/cluster.conf<?xml version=”1.0″?>
<cluster name=”cluster1″ config_version=”3″>
<cman two_node=”1″ expected_votes=”1″/>
<clusternodes>
</clusternode>
<clusternode name=”GFS2″ votes=”1″ nodeid=”2″>
<cluster name=”cluster1″ config_version=”3″>
<cman two_node=”1″ expected_votes=”1″/>
<clusternodes>
<clusternode name=”GFS1″ votes=”1″ nodeid=”1″>
<fence>
<method name=”single”>
<device name=”manual” ipaddr=”10.0.0.71″/>
</method>
</fence>
</clusternode>
<clusternode name=”GFS2″ votes=”1″ nodeid=”2″>
<fence>
<method name=”single”>
<device name=”manual” ipaddr=”10.0.0.72″/>
</method>
</fence>
</clusternode>
</clusternodes>
<fence_daemon clean_start=”1″ post_fail_delay=”0″ post_join_delay=”3″/>
<fencedevices>
<fencedevice name=”manual” agent=”fence_manual”/>
</fencedevices>
</cluster>
Change Lock type: (depend on system enviroments)
# vim /etc/lvm/lvm.conf
#locking_type = 1
#locking_dir = “/var/lock/lvm”
#library_dir = “/lib/lvm2″
locking_library = “liblvm2clusterlock.so”
locking_type = 2
library_dir = “/lib/lvm2″
#locking_type = 1
#locking_dir = “/var/lock/lvm”
#library_dir = “/lib/lvm2″
locking_library = “liblvm2clusterlock.so”
locking_type = 2
library_dir = “/lib/lvm2″
Restart service:
#/etc/init.d/cman restart
#/etc/init.d/clvm restart
#/etc/init.d/clvm restart
Format SAN Disk to GFS:
#mkfs.gfs2 -p lock_dlm -t cluster1:gfs -j 2 /dev/sdb1 ( /dev/sdb1 : SAN DISK)
#fs2_fsck /dev/sdb1
#fs2_fsck /dev/sdb1
Mount GFS:
#mount -t gfs2 /dev/sdb1 /data
Auto Mount:
#vim /etc/rc.local
sleep 5
mount -t gfs2 /dev/sdb1 /data
sleep 5
mount -t gfs2 /dev/sdb1 /data
Post a Comment
Post a Comment