我正在配置一个双节点 A/A 集群,通过 iSCSI 连接一个公共存储,它在集群 LVM 之上使用 GFS2。到目前为止,我已经准备了一个简单的配置,但我不确定哪个是配置 gfs 资源的正确方法。
这是 /etc/cluster/cluster.conf 的 rm 部分:
<rm>
<failoverdomains>
<failoverdomain name="node1" nofailback="0" ordered="0" restricted="1">
<failoverdomainnode name="rhc-n1"/>
</failoverdomain>
<failoverdomain name="node2" nofailback="0" ordered="0" restricted="1">
<failoverdomainnode name="rhc-n2"/>
</failoverdomain>
</failoverdomains>
<resources>
<script file="/etc/init.d/clvm" name="clvmd"/>
<clusterfs name="gfs" fstype="gfs2" mountpoint="/mnt/gfs" device="/dev/vg-cs/lv-gfs"/>
</resources>
<service name="shared-storage-inst1" autostart="0" domain="node1" exclusive="0" recovery="restart">
<script ref="clvmd">
<clusterfs ref="gfs"/>
</script>
</service>
<service name="shared-storage-inst2" autostart="0" domain="node2" exclusive="0" recovery="restart">
<script ref="clvmd">
<clusterfs ref="gfs"/>
</script>
</service>
</rm>
Run Code Online (Sandbox Code Playgroud)
这就是我的意思:使用 clusterfs 资源代理处理 GFS 分区时,默认情况下不会卸载它(除非给出 force_unmount 选项)。这样当我发出
clusvcadm -s shared-storage-inst1
clvm …