朋友新建的一套osc 4.4环境,安装配置完成后,执行cluster status命令时,会夯住,如下图所示: 查看系统日志,发现如下报错:

Dec  2 09:31:10 sol04 genunix: [ID 108990 kern.notice] NOTICE: CMM: Cluster members: sol03 sol04.
Dec  2 09:31:10 sol04 genunix: [ID 279084 kern.notice] NOTICE: CMM: node reconfiguration #4 completed.
Dec  2 09:31:16 sol04 genunix: [ID 670799 kern.warning] WARNING: CMM: Registering reservation key on quorum device /dev/did/rdsk/d5s2 failed with error 2.
Dec  2 09:31:16 sol04 genunix: [ID 868277 kern.warning] WARNING: CMM: Erstwhile online quorum device /dev/did/rdsk/d5s2 (qid 1) is inaccessible now.

从日志中判断,跟quorum相关。使用clq命令查看quorum设备信息,如下图: 由图中得知,d5的Access Mode为scsi3。对于access mode官方的解释(Doc ID 1008224.1)如下图: 查看d5的路径,确认其由两个路径组成,如下图: Solaris Cluster 3.1之前的版本,默认的global_fencing值为"pathcount",而3.2之后的版本,官方推荐使用SCSI-3。查看默认的global_fencing值,如下图: 设置global_fencing的值,如下:

root@sol04:~# cluster set -p global_fencing=pathcount              
root@sol04:~# cluster show -t global

最后,从quorum中删除d5,先设置d5的access mode为nofencing,再设置为global,最后再添加到quorum中,如下:

root@sol04:~# clq remove d5
root@sol04:~# cldevice set -p default_fencing=nofencing 5
root@sol04:~# cldevice set -p default_fencing=global 5
root@sol04:~# clq add d5
root@sol04:~# clq show

到此,整个故障完美解决。 其他设备的defaultfencing设置可以使用下面的命令检查:

root@sol04:~# scdidadm -L -o instance -o defaultfencing -o detectedfencing -o fullpath

集群的fencing protocol可以使用下面的命令验证:

root@sol04:~# scdidadm -G
The cluster is currently configured to use DID path count algorithm to determine fencing protocol for shared devices.