我正在试用SLES 12 w / HAE来运行由两个节点组成的文件服务器群集。 想法是使用SCSI持久预留作为使用stonith fence代理的fence_scsi脚本的防护方法。 两个节点(a,b)通过FC连接到同一个LUN,然后通过NFS从主动节点导出。
问题是与fence_scsi crm失败/抱怨nodename /键没有提供。
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被提供,那么它不会抱怨。 但是,我不明白击剑configuration。 我应该设置两个stonith:fence_scsi资源每个“粘贴”到每个节点?
这是来自RHEL的一个例子,它负责整个事情,没有额外的限制(它起作用了!)
pcs stonith create my-scsi-shooter fence_scsi devices=/dev/sda meta provides=unfencing
参考RHEL文档
请注意,SLES12仍然使用crm,而RHEL使用pcs。 另外在SLES中,元属性provides不存在。 有没有办法将RHEL pcs命令转换为SLES?
这里完整的configuration:
# 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.conf http://pastebin.com/M5sr7htC
corosync 2.3.3
起搏器1.1.12