一、故障描述

  1、关机时,一台主机的0域关闭会自动引起另外一台主机的0域重启,但由于有HA机制,造成重启的主机必须等待关机的主机开启后才能完全进入系统,这就造成了一个死循环了,无法正常关闭系统

 2、开机的时候,会报错:

   我用单用户模式进入系统后,发现存储没挂载,用fsck –y命令后,存储才挂载

3、查看SUN Cluster日志,发现频繁报这个警告:

 cl_runtime: [ID 856360 kern.warning] WARNING: QUORUM_GENERIC: quorum_read_keys error: Reading the regi

二、分析过程

1、查看dmesg信息

     Feb 7 13:27:28 rdmsdb02a cl_runtime: [ID 856360 kern.war
ning] WARNING: QUORUM_GENERIC: quorum_read_keys error: Reading the registration keys failed on quorum device /dev/did/rdsk/d4s2 with error 22.

结论: 通过这个信息判断可能是quorum disk磁盘存在问题

2、查看cluster状态
    # scstat
  -- Quorum Votes by Device (current status) --
                   Device Name         Present  Possible  Status
                   -----------         ------- -------- ------
 Device votes:     /dev/did/rdsk/d4s2   0        1       Offline

结论:确定quorum disk磁盘offline

4、mount信息

 查看/etc/vfstab,发现
“options”选项的信息为logging,所以推断系统未采用文件系统日志功能,故在异常关机后,有可能需要手动执行fsck命令(不知道这样推断是否合理?)

三、结论

1、关机错误
 故障概述:一台主机的0域关闭会自动引起另外一台主机的0域重启,但由于有HA机制,造成重启的主机必须等待关机的主机开启后才能完全进入系统,这就造成了一个死循环了,无法正常关闭系统

故障原因:根据以上问题分析,判断此故障和quorum disk状态为 offline有关。根据cluster的设置原理,quorum disk为重要的投票点,当某个节点出现问题或两节点通讯中断后,为了防止“脑裂”情况出现,权值低的系统自动重启,当quorum disk出现问题,两个节点的票权相同,且都为权值低的节点,某个节点出现问题或两节点通讯中断,两节点都为权值低的节点,故出现重启现象。      
所以此故障是由于Quorum disk 状态为offline,节点启动的过程中两节点都不能获取quorum disk的投票造成反复重启。

解决方法:新增一块1GB quorum disk专用于quorum disk。删除之前offline的仲裁盘

2、开机错误
故障概述:系统开机后出现循环报错,通过单用户模式进入系统后需用fsck命令校验磁盘后才可挂载上存储磁盘。

故障原因:根据文件系统mount选项为logging,系统在文件系统出现故障时,并不会自动进行fsck处理,需手动干预,所以开机后,由于文件系统报错,且没有自动执行fsck,造成了系统无法开机,需进行人工fsck后才挂载存储的错误。这也是造成了quorum disk 状态为offline的根本原因。(分析是否正确??)

解决方法:修改文件系统mount选项,将vfstab文件中的文件系统logging选项调整为缺省

3、quorum disk故障

 故障现象:查看/var/adm/messages日志发现有持续告警信息:Feb 14 03:10:40 rdmsdb01a cl_runtime: [ID 856360 kern.warning] WARNING: QUORUM_GENERIC: quorum_read_keys error: Reading the regi

故障原因:由于quorum disk(4.2T,也是数据盘)盘过大,在调整mount选项后,如文件系统出现问题,在系统启动时依然会由于fsck过程过长,造成quorum disk磁盘获取失败的问题。

 解决方法:将大磁盘分解为多块较小容量的磁盘,磁盘数小于cpu数,但风险较大,暂不实施

四、问题处理步骤

1、停止所有资源
#scswitch -F -g oradb_rg    //停止所有资源(VIP也停掉)        
#scswitch -n -j lh_oracle    //关闭各个资源(开机时需手动开启)
#scswitch -n -j oracle-re    
#scswitch -n -j oradata-re  
#scswitch -n -j archive-re  
#scswitch -n -j ora-server-re
#scswitch -n -j ora-lsnr-re  

# scstat -g //查看资源组及所有资源状态

2、修改vsftab文件
把文件系统logging选项调整为缺省,即将“options”选项的信息的“logging”换成“-”

3、从存储划分一块1g的磁盘给系统

4、操作系统识别并配置磁盘

  #cfgadm –al //两个节点均执行此命令,显示有关 SCSI 设备(如磁盘和磁带)的信息。
  #format  

 AVAILABLE DISK SELECTIONS:
      0. c0**d0 <**>
       ****
      1. c0**d0 <**>
     ****
     2. c1**d1 <HITACHI-OPEN-V-SUN   cyl 278 alt 2 hd 15 sec 512>
        ****
      3. c2**d1 <HITACHI-OPEN-V-SUN  cyl 278 alt 2 hd 15 sec 512>
       ****
      4. c3**d0 <HITACHI-OPEN-V*16   -SUN-4.16TB>
      ****
    目前存储给系统新划分了1G的存储空间,但由于有多块HBA卡,所有系统识别时会将同一块存储空间识别为多块同一大小的硬盘(红色表示的2和3),故要通过多路径软件进行配置,以便存储划分的1g空间在系统上识别为一块1g的硬盘。
   #cd /opt/DynamicLinkManager/bin   //多路径软件所在目录
  #./dlmsetconf  //配置多路径软件,输入命令后系统会自动进行相关设置
KAPL10242-I To configure HDLM, device files of sd/ssd devices managed by HDLM are removed after reboot.
Do you want to continue? [y/n]:n
KAPL10256-I The user terminated the operation.

  #sync;sync;reboot -- -r //重启系统

  #format  //系统识别出的新划分的1g磁盘,且只有一块
AVAILABLE DISK SELECTIONS:
      0. c0**d0 <**>
       ****
      1. c0**d0 <**>
     ****
      2. c3**d0 <HITACHI-OPEN-V*16   -SUN-4.16TB>
      ****
      3. c1**d1 <HITACHI-OPEN-V-SUN  cyl 278 alt 2 hd 15 sec 512>
        ****
   278个磁柱,每个磁柱有15个磁头,每个磁头管理512个扇区,每个扇区的大小均为512字节,所有每个磁柱的大小为15*512*512= 3932160 bytes;一共有278个磁柱,所有此磁盘的大小为278*3932160约等于1G(这样算合适不?希望给予指正)

 Specify disk (enter its number): 3
selecting c3t50060E8005638900d1
[disk formatted]
 format> label   //将新标签写入当前磁盘,标签一般存放了关磁盘的控制器、几何参数和分片的信息,为磁盘设置标签通常是在系统安装过程中或者使用新磁盘时进行的,一般磁盘出厂时都自带标签,但异构环境下,solaris有可能无法识别标签,所以最好重新添加标签。
Ready to label disk, continue? Y
format> quit
#scdidadm -L //查看SUN cluster管理的磁盘情况,找出新加磁盘对应得DXX的号.
以便选择作为仲裁盘的磁盘序号,该磁盘必须两个节点都可以访问的共享磁盘,这里我们选择的是DID号为d8的新划分的1G磁盘。
#scdidadm –C  //将不存在的设备上的映射关系删除
#sync;sync;init 6 //重启系统

5、调整quorum disk

# scsetup   //磁盘组注册为Sun Cluster 磁盘设备组
 *** Main Menu ***
   Please select from one of the following options:
     1) Quorum
       2) Resource groups
       3) Cluster interconnect
       4) Device groups and volumes
       5) Private hostnames
       6) New nodes
       7) Other cluster properties
     ?) Help with menu options
       q) Quit
   Option:  1
*** Quorum Menu ***
   Please select from one of the following options:
     1) Add a quorum disk
       2) Remove a quorum disk
     ?) Help
       q) Return to the Main Menu
         Option:  1    // 将新划分的1g的磁盘设置为仲裁盘,
>>> Add a Quorum Disk <<<
   This option is used to add a quorum disk to the cluster
   configuration. SCSI-2 disks can be used for dual-ported quorum
   devices. However, SCSI-3 PGR disks must be used when there are more
   than two node-to-disk paths. You can use a disk containing user data
   or one that is a member of a device group as a quorum device. For
   more information on supported quorum device topologies, see the Sun
   Cluster documentation.
   Each quorum disk must be connected to at least two nodes. Adding a
   quorum device automatically configures node-to-disk paths for all
   nodes attached to the disk. Later, if you add more nodes to the
   cluster, you might need to update these paths by removing then adding
   back the quorum device.
      Is it okay to continue (yes/no) [yes]?
   Which global device do you want to use (d<N>)? d8 //选择使用哪个全局设备,这里用d8代替d4
   Is it okay to proceed with the update (yes/no) [yes]?  yes
  scconf -a -q globaldev=d8 //至此d8作为一个新的仲裁盘已经添加完毕。
此时,查看cluster状态,会发现仲裁盘会有两块,一块online,一块offline

# scstat -q
-- Quorum Votes by Device –
Device Name    Present     Possible        Status
Device votes:     /dev/did/rdsk/d4s2    0       1       Offline
Device votes:     /dev/did/rdsk/d8s2   1       1       Online

# scconf -r -q globaldev=d4 //删除之前offline的d4删除

此时,再来查看cluster的状态:

# scstat -q
-- Quorum Votes by Device (current status)
                   Device Name         Present Possible Status
                   -----------         ------- -------- ------
 Device votes:     /dev/did/rdsk/d8s2  1        1       Online //只有一个仲裁盘且为online状态

# scswitch -Z -g oradb_rg  //开启所有资源

#scstat   -g   //查看资源状态

所有资源都启动,则一切ok