![SLES 12 高可用性集群 - scsi 持久预留防护](https://linux22.com/image/661352/SLES%2012%20%E9%AB%98%E5%8F%AF%E7%94%A8%E6%80%A7%E9%9B%86%E7%BE%A4%20-%20scsi%20%E6%8C%81%E4%B9%85%E9%A2%84%E7%95%99%E9%98%B2%E6%8A%A4.png)
我正在试用 SLES 12 和 HAE 来运行由两个节点组成的文件服务器集群。想法是使用 SCSI 持久保留作为隔离方法,使用来自 stonith 隔离代理的 fence_scsi 脚本。两个节点 (a、b) 通过 FC 连接到同一个 LUN,然后仅通过 NFS 从活动节点导出。
问题出在 fence_scsi 上,因为 crm 失败/抱怨未提供节点名/密钥。
primitive storage-fence stonith:fence_scsi \
params action=off devices="/dev/mapper/mpath_test" \
op monitor interval=60s timeout=0s
我最终得到:
storage-fence_start_0 on fs009a 'unknown error' (1): call=18, status=Error, last-rc-change='Wed Jun 17 00:51:40 2015', queued=0ms, exec=1093ms
storage-fence_start_0 on fs009b 'unknown error' (1): call=18, status=Error, last-rc-change='Wed Jun 17 00:56:42 2015', queued=0ms, exec=1101ms
和
2015-06-17T01:34:29.156751+02:00 fs009a stonithd[25547]: warning: log_operation: storage-fence:25670 [ ERROR:root:Failed: nodename or key is required ]
2015-06-17T01:34:29.156988+02:00 fs009a stonithd[25547]: warning: log_operation: storage-fence:25670 [ ]
2015-06-17T01:34:29.157234+02:00 fs009a stonithd[25547]: warning: log_operation: storage-fence:25670 [ ERROR:root:Please use '-h' for usage ]
2015-06-17T01:34:29.157460+02:00 fs009a stonithd[25547]: warning: log_operation: storage-fence:25670 [ ]
现在,如果nodename
提供了,它就不会抱怨。但是我不明白隔离配置。我是否应该设置两个stonith:fence_scsi
资源,每个资源都“粘贴”到两个节点中的每一个?
这是来自 RHEL 的一个示例,它处理整个事情,没有任何额外的限制(并且它可以工作!)
pcs stonith create my-scsi-shooter fence_scsi devices=/dev/sda meta provides=unfencing
请注意,SLES12 仍使用 crm,而 RHEL 使用 pcs。此外,SLES 中不存在 meta 属性provides
。有没有办法将 RHEL pcs 命令转换为 SLES?
完整的配置如下:
# crm configure show
node 739719956: fs009a \
attributes maintenance=off standby=off
node 739719957: fs009b \
attributes maintenance=off standby=off
primitive clusterIP IPaddr2 \
params ip=172.23.59.22 cidr_netmask=25 \
op monitor interval=10s timeout=20s \
op stop interval=0s timeout=20s \
op start interval=0 timeout=20s
primitive fs_storage_test Filesystem \
params device="/dev/mapper/mpath_test_part1" directory="/TEST" fstype=ext4 \
op monitor timeout=40 interval=20 \
op start timeout=60 interval=0 \
op stop timeout=60 interval=0 \
meta target-role=Started
primitive nfs-server systemd:nfsserver \
op monitor interval=60 timeout=15 \
op start interval=0 timeout=15 \
op stop interval=0 timeout=15
primitive storage-fence stonith:fence_scsi \
params action=off devices="/dev/mapper/mpath_test" verbose=false \
op monitor interval=60s timeout=0s \
meta target-role=Started
group nas-service clusterIP fs_storage_test nfs-server \
meta target-role=Started
location constraint-location-a nas-service 100: fs009a
property cib-bootstrap-options: \
dc-version=1.1.12-ad083a8 \
cluster-infrastructure=corosync \
cluster-name=fs009 \
stonith-enabled=true \
no-quorum-policy=stop \
last-lrm-refresh=1434493344
rsc_defaults rsc-options: \
resource-stickiness=100
corosync配置文件http://pastebin.com/M5sr7htC
corosync 2.3.3
起搏器 1.1.12