免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 5502 | 回复: 11
打印 上一主题 下一主题

[求助]sun cluster 3.1节点重装后恢复 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-10-27 15:31 |只看该作者 |倒序浏览
双机主备节点的sun cluster,failover方式。sun cluster 3.1版本,节点主机solaris10

现在一个节点彻底完蛋,没有任何备份可供恢复系统,重新做一次clean install。

请问在重装系统(包括sc软件)之后能否再加入到原有的cluster中?

望高人指点一下。

多谢了!

论坛徽章:
7
荣誉会员
日期:2011-11-23 16:44:17水瓶座
日期:2013-08-28 21:20:16丑牛
日期:2013-10-02 21:01:462015年迎新春徽章
日期:2015-03-04 09:54:45操作系统版块每日发帖之星
日期:2016-06-05 06:20:0015-16赛季CBA联赛之吉林
日期:2016-06-20 08:24:0515-16赛季CBA联赛之四川
日期:2016-08-18 15:02:02
2 [报告]
发表于 2010-10-27 15:47 |只看该作者
肯定可以,但是没人能够总结出适合各种情况的cluster单节点恢复的文档,因为中间的变数太多。

论坛徽章:
0
3 [报告]
发表于 2010-10-27 15:51 |只看该作者
回复 2# nimysun


    只是双节点的主备。没有其他节点。
   坏掉的节点重装后,scinstall就可以么?

论坛徽章:
0
4 [报告]
发表于 2010-10-27 17:22 |只看该作者
首先要从cluster中把换掉的那个节点驱逐出去吧
有一次也尝试过,后来失败,干脆直接2个节点全部重装了,还好不是生产环境

论坛徽章:
0
5 [报告]
发表于 2010-10-28 11:24 |只看该作者
回复 4# yqx1986


    当时是怎么个思路?参照一个节点的CCR文件重建另一个节点的CCR文件么?
   除此之外还有什么要注意的?
   多谢了!

论坛徽章:
0
6 [报告]
发表于 2010-10-28 11:40 |只看该作者
回复 5# hycl5410


    我也是新手,当时想的太简单了,想法就是到非集群模式下把故障节点驱逐出去,然后再重新加入,结果驱逐节点就遇到问题了,后来就直接放弃了。
    还有一个想法是从正常的节点将OS做dump到故障节点,然后改改IP什么的,就可以重新加入cluster中,但是没有去尝试。

论坛徽章:
0
7 [报告]
发表于 2010-10-28 17:32 |只看该作者
回复  hycl5410


    我也是新手,当时想的太简单了,想法就是到非集群模式下把故障节点驱逐出去,然后 ...
yqx1986 发表于 2010-10-28 11:40



    dump的方式是可行的,要改的东西也不少。至少我是不会改,但是我知道有这样的案例。

   既然dump方式可行,clean install之后重新加入cluster应该也是可以的,就是不知道都需要动哪些文件。
   希望有高手能出来帮个忙。

论坛徽章:
1
狮子座
日期:2013-09-02 12:10:41
8 [报告]
发表于 2010-10-29 10:04 |只看该作者
给你个大概思路,使用正常节点的系统备份恢复失败节点,但是需要更改的东西就太多了,系统方面的我就不说了,应用方面的自己考虑,cluster更改的东西可以参考以下cluster更改主机名的方法(括号后面的中文是我实际操作时加入的注释)。

How to Change Sun Cluster Node Names
Fabio Morais do Nascimento, April 2009

Make a copy of /etc/cluster/ccr/infrastructure:
(/etc/cluster/ccr/global/infrastructure)
# cp /etc/cluster/ccr/infrastructure /etc/cluster/ccr/infrastructure.old
Edit /etc/cluster/ccr/infrastructure:

# vi /etc/cluster/ccr/infrastructure
Change node names as you want. For example, change srv01 to server01 and srv02 to server02.

If necessary, change the Solaris node name:

# echo server01 > /etc/nodename
Regenerate the checksum for the infrastructure file:

# /usr/cluster/lib/sc/ccradm -i /etc/cluster/ccr/infrastructure -o  在3.2u3之前的版本使用
(/usr/cluster/lib/sc/ccradm recover -o /etc/cluster/ccr/global/infrastructure 实际3.2u3版本中使用
(/usr/cluster/lib/sc/ccradm recover -Z global -o ccrtablefile
帮助手册解释不使用-o选项是
rejoins the cluster, at which time the cluster will replace
the contents of ccrtablefile with the contents of ccrtablefile
from another node in the cluster.
If ccrtablefile has a generation number of INIT_VERSION on
all nodes, then the CCR table will remain invalid after
recovery has completed. Therefore, do not use the init
subcommand without the -o option on a CCR table file on
all nodes in the cluster (如果全部节点都使用了-o选项,此时cluster会随机使用一个ccrtablefile的内容)
Shut down Sun Cluster and boot both nodes:

# cluster shutdown -g 0 -y
ok boot
实际中在第一步就应该Reboot all of the cluster nodes in non-cluster mode.

论坛徽章:
1
狮子座
日期:2013-09-02 12:10:41
9 [报告]
发表于 2010-10-29 10:33 |只看该作者
再给你一个删除加入节点的过程自己参考
删除节点步骤
scconf -r -h hostname   列出还在使用的设备
scconf -c -q node=hostname,maintstate 设置主机到维护状态
scrgadm -pvv|grep hostname
scconf -c -g rg -y Nodelist=hostname  删除资源组中节点
scconf -r -D name=diskdg,nodelist=hostname 删除磁盘设备组中节点
(如果是svm资源组,请查找并参考svm删除主机文档)
scconf -pvv|grep Local           检查并准备删除DID设备
  (dsk/d9) 设备组类型:                             Local_Disk
  (dsk/d1) 设备组类型:                             Local_Disk
scdidadm -L d9 d1
scconf -c -D name=dsk/d9,localonly=false
必须LANG=C
scconf -pvv | grep hostname | grep Device
scconf -r -D name=dsk/d9,nodelist=hostname
scconf -r -D name=dsk/d8,nodelist=hostname
.......
scconf -pvv | grep -i "transport cable" 检查并准备删除心跳
scconf -r -m endpoint=hostname:ce2
scconf -r -m endpoint=hostname:ce3
scconf -pvv | grep -i "transport cable" 再次确认已经没有心跳
scconf -pvv | grep -i quorum | grep hostname检查并准备删除票盘
scconf -c -q installmode 设置双机到安装模式
scconf -r -q globaldev=d6  删除票盘
scconf -r -h hostname  删除主机

加入节点步骤
scconf -a -T node=hostname  加入新节点信任关系
按照最初安装文档安装操作系统,补丁设置各种系统参数
安装cluster软件和补丁,重启系统后执行
scinstall选择加入节点,自动重启后
scconf -a -q globaldev=d6  加入票盘
scconf -c -q reset  重置安装模式
如果使用vxvm,需要安装vxvm并打补丁
确认新安装节点的/etc/name_to_major vxio与原有节点vxio相同,不相同使用下面方法更改
vi /etc/name_to_major
vxio 330
drvconfig -b -i vxio -m 330
scconf -a -D name=diskdg,nodelist=hostname 节点加入磁盘设备组
scrgadm -c -g db-rg -y nodelist=hostname0,hostname 节点加入资源组
(最好根据原有实施文档,所有单个资源必须确保有agent和补丁并设置和另一个节点一样,比如说/etc/vfstab文件中关于存储资源的设置,/etc/hosts中关于ip资源的设置)

论坛徽章:
0
10 [报告]
发表于 2010-11-01 16:02 |只看该作者
回复 9# byuq


    scconf -c -g rg -y Nodelist=hostname  删除资源组中节点
这一个我始终无法删除。命令上不支持。其他device name,quorum等我都成功删除了。

root@igwb2 # scconf -c
Change options (scconf -c):
        -C cluster=clustername
        -A node=node,name=name[,state=state][,otheroptions]
        -B name=name[,state=state][,otheroptions]
        -m endpoint=[node:]name[@port],state=state
        -P node=node[,privatehostname=hostalias]
        -q globaldev=devicename,maintstate
        -q globaldev=devicename,reset
        -q node=node,maintstate
        -q node=node,reset
        -q reset
        -D name=name[,nodelist=node[:node]...][,failback={enabled | disabled}],o
theroptions
        -T authtype=authtype
        -H
        -v





root@igwb2 # scconf -pvv
Cluster name:                                      lab-igwb
Cluster ID:                                        0x4A7A4D11
Cluster install mode:                              enabled
Cluster private net:                               172.16.0.0
Cluster private netmask:                           255.255.0.0
Cluster new node authentication:                   unix
Cluster new node list:                             <NULL - Allow any node>
Cluster nodes:                                     igwb2 igwb1

Cluster node name:                                 igwb2
  (igwb2) Node ID:                                 1
  (igwb2) Node enabled:                            yes
  (igwb2) Node private hostname:                   clusternode1-priv
  (igwb2) Node quorum vote count:                  1
  (igwb2) Node reservation key:                    0x4A7A4D1100000001
  (igwb2) Node transport adapters:                 hme0 hme1

  (igwb2) Node transport adapter:                  hme0
    (igwb2:hme0) Adapter enabled:                  yes
    (igwb2:hme0) Adapter transport type:           dlpi
    (igwb2:hme0) Adapter property:                 device_name=hme
    (igwb2:hme0) Adapter property:                 device_instance=0
    (igwb2:hme0) Adapter property:                 dlpi_heartbeat_timeout=10000
    (igwb2:hme0) Adapter property:                 dlpi_heartbeat_quantum=1000
    (igwb2:hme0) Adapter property:                 nw_bandwidth=80
    (igwb2:hme0) Adapter property:                 bandwidth=10
    (igwb2:hme0) Adapter property:                 netmask=255.255.255.128
    (igwb2:hme0) Adapter property:                 ip_address=172.16.0.129
    (igwb2:hme0) Adapter port names:               <NULL>

  (igwb2) Node transport adapter:                  hme1
    (igwb2:hme1) Adapter enabled:                  yes
    (igwb2:hme1) Adapter transport type:           dlpi
    (igwb2:hme1) Adapter property:                 device_name=hme
    (igwb2:hme1) Adapter property:                 device_instance=1
    (igwb2:hme1) Adapter property:                 dlpi_heartbeat_timeout=10000
    (igwb2:hme1) Adapter property:                 dlpi_heartbeat_quantum=1000
    (igwb2:hme1) Adapter property:                 nw_bandwidth=80
    (igwb2:hme1) Adapter property:                 bandwidth=10
    (igwb2:hme1) Adapter property:                 netmask=255.255.255.128
    (igwb2:hme1) Adapter property:                 ip_address=172.16.1.1
    (igwb2:hme1) Adapter port names:               <NULL>

Cluster node name:                                 igwb1
  (igwb1) Node ID:                                 2
  (igwb1) Node enabled:                            yes
  (igwb1) Node private hostname:                   clusternode2-priv
  (igwb1) Node quorum vote count:                  0
  (igwb1) Node reservation key:                    0x4A7A4D1100000002
  (igwb1) Node transport adapters:                 hme0 hme1

  (igwb1) Node transport adapter:                  hme0
    (igwb1:hme0) Adapter enabled:                  yes
    (igwb1:hme0) Adapter transport type:           dlpi
    (igwb1:hme0) Adapter property:                 device_name=hme
    (igwb1:hme0) Adapter property:                 device_instance=0
    (igwb1:hme0) Adapter property:                 dlpi_heartbeat_timeout=10000
    (igwb1:hme0) Adapter property:                 dlpi_heartbeat_quantum=1000
    (igwb1:hme0) Adapter property:                 nw_bandwidth=80
    (igwb1:hme0) Adapter property:                 bandwidth=10
    (igwb1:hme0) Adapter property:                 netmask=255.255.255.128
    (igwb1:hme0) Adapter property:                 ip_address=172.16.0.130
    (igwb1:hme0) Adapter port names:               <NULL>

  (igwb1) Node transport adapter:                  hme1
    (igwb1:hme1) Adapter enabled:                  yes
    (igwb1:hme1) Adapter transport type:           dlpi
    (igwb1:hme1) Adapter property:                 device_name=hme
    (igwb1:hme1) Adapter property:                 device_instance=1
    (igwb1:hme1) Adapter property:                 dlpi_heartbeat_timeout=10000
    (igwb1:hme1) Adapter property:                 dlpi_heartbeat_quantum=1000
    (igwb1:hme1) Adapter property:                 nw_bandwidth=80
    (igwb1:hme1) Adapter property:                 bandwidth=10
    (igwb1:hme1) Adapter property:                 netmask=255.255.255.128
    (igwb1:hme1) Adapter property:                 ip_address=172.16.1.2
    (igwb1:hme1) Adapter port names:               <NULL>

Cluster transport junctions:                       <NULL>


Cluster transport cables

                    Endpoint            Endpoint            State
                    --------            --------            -----


Quorum devices:                                    <NULL>

Device group name:                                 dsk/d3
  (dsk/d3) Device group type:                      Disk
  (dsk/d3) Device group failback enabled:          no
  (dsk/d3) Device group node list:                 igwb2
  (dsk/d3) Device group ordered node list:         no
  (dsk/d3) Device group device names:              /dev/did/rdsk/d3s2

Device group name:                                 dsk/d2
  (dsk/d2) Device group type:                      Disk
  (dsk/d2) Device group failback enabled:          no
  (dsk/d2) Device group node list:                 igwb2
  (dsk/d2) Device group ordered node list:         no
  (dsk/d2) Device group device names:              /dev/did/rdsk/d2s2

Device group name:                                 dsk/d1
  (dsk/d1) Device group type:                      Local_Disk
  (dsk/d1) Device group failback enabled:          no
  (dsk/d1) Device group node list:                 igwb2
  (dsk/d1) Device group ordered node list:         no
  (dsk/d1) Device group device names:              /dev/did/rdsk/d1s2
root@igwb2 #
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP