Chinaunix

标题: 如何察看Sun Cluster里哪些resource type已经被安装 [打印本页]

作者: Hickory    时间: 2007-08-13 15:17
标题: 如何察看Sun Cluster里哪些resource type已经被安装
如何察看Sun Cluster里哪些resource type已经被安装?怎么知道不同resource type的用途呢?还有如果缺少某个resource type,可以在那里得到呢?

先谢谢各位的答复了。

[ 本帖最后由 Hickory 于 2007-8-13 16:40 编辑 ]
作者: 东方蜘蛛    时间: 2007-08-13 15:34
scrgadm -p
scrgadm -pv
scrgadm -pvv

作者: 东方蜘蛛    时间: 2007-08-13 15:38
缺少的肯定是要去agent光盘安装了 用我上面告诉你的命令能看到这个resource type对应的描述
作者: Hickory    时间: 2007-08-13 15:44
谢谢蜘蛛的回复。
如果某个resource type被安装了,但是并没有被cluster使用,用scrgadm -pv可以看到未被使用的resource type吗?
作者: 东方蜘蛛    时间: 2007-08-13 15:47
原帖由 Hickory 于 2007-8-13 15:44 发表
谢谢蜘蛛的回复。
如果某个resource type被安装了,但是并没有被cluster使用,用scrgadm -pv可以看到未被使用的resource type吗?



最上面会列出已经注册的所有资源类型,下面会列出哪些资源使用了哪个资源类型
作者: 东方蜘蛛    时间: 2007-08-13 15:50
要简单的看的话用前两个就够了,后面那个是详细显示,内容会比较多,看了眼会比较花
作者: OpenSolari    时间: 2007-08-13 16:04
LZ,resource type是啥子东西?
作者: Hickory    时间: 2007-08-13 16:04
谢谢蜘蛛了。

我的lab里有一套cluster,

# scrgadm -pv

Res Type name:                                     SUNW.LogicalHostname:2
  (SUNW.LogicalHostname:2) Res Type description:   Logical Hostname Resource Type
  (SUNW.LogicalHostname:2) Res Type base directory: /usr/cluster/lib/rgm/rt/hafoip
  (SUNW.LogicalHostname:2) Res Type single instance: False
  (SUNW.LogicalHostname:2) Res Type init nodes:    All potential masters
  (SUNW.LogicalHostname:2) Res Type failover:      True
  (SUNW.LogicalHostname:2) Res Type version:       2
  (SUNW.LogicalHostname:2) Res Type API version:   2
  (SUNW.LogicalHostname:2) Res Type installed on nodes: <All>
  (SUNW.LogicalHostname:2) Res Type packages:      SUNWscu
  (SUNW.LogicalHostname:2) Res Type system:        True

Res Type name:                                     SUNW.SharedAddress:2
  (SUNW.SharedAddress:2) Res Type description:     HA Shared Address Resource Type
  (SUNW.SharedAddress:2) Res Type base directory:  /usr/cluster/lib/rgm/rt/hascip
  (SUNW.SharedAddress:2) Res Type single instance: False
  (SUNW.SharedAddress:2) Res Type init nodes:      All nodes
  (SUNW.SharedAddress:2) Res Type failover:        True
  (SUNW.SharedAddress:2) Res Type version:         2
  (SUNW.SharedAddress:2) Res Type API version:     2
  (SUNW.SharedAddress:2) Res Type installed on nodes: <All>
  (SUNW.SharedAddress:2) Res Type packages:        SUNWscu
  (SUNW.SharedAddress:2) Res Type system:          True

Res Group name:                                    ha-ora-rg
  (ha-ora-rg) Res Group RG_description:            <NULL>
  (ha-ora-rg) Res Group mode:                      Failover
  (ha-ora-rg) Res Group management state:          Unmanaged
  (ha-ora-rg) Res Group RG_project_name:           default
  (ha-ora-rg) Res Group RG_affinities:             <NULL>
  (ha-ora-rg) Res Group Auto_start_on_new_cluster: True
  (ha-ora-rg) Res Group Failback:                  False
  (ha-ora-rg) Res Group Nodelist:                  v440b v440a
  (ha-ora-rg) Res Group Maximum_primaries:         1
  (ha-ora-rg) Res Group Desired_primaries:         1
  (ha-ora-rg) Res Group RG_dependencies:           <NULL>
  (ha-ora-rg) Res Group network dependencies:      True
  (ha-ora-rg) Res Group Global_resources_used:     <All>
  (ha-ora-rg) Res Group Pingpong_interval:         3600
  (ha-ora-rg) Res Group Pathprefix:                <NULL>
  (ha-ora-rg) Res Group system:                    False


为什么会没有SUNW.HAStoragePlus这个resource type呢?这个RT应该也包含在SUNWscu里面。看起来,只是安装上的resource type,但是并没有在cluster里注册使用的resource type是不能被scrgadm -pv列出来的哦。我想问的是如何察看这些已经安装的,但是并未被注册使用的resource type。


[ 本帖最后由 Hickory 于 2007-8-13 16:41 编辑 ]
作者: 东方蜘蛛    时间: 2007-08-13 16:10
scrgadm -a -t SUNW.HAStoragePlus    //这个资源默认是没有的,你得注册一下才可以!
scrgadm -pv
作者: Hickory    时间: 2007-08-13 16:11
原帖由 OpenSolari 于 2007-8-13 16:04 发表
LZ,resource type是啥子东西?


我的理解是resource type是Cluster用来管理某一类资源的一整套方法的集合。具体来说,就是管理某资源的启动,停止以及监控运行状态的一堆脚本或者二进制文件。
作者: 东方蜘蛛    时间: 2007-08-13 16:13
我都告诉你了,最上面看到的就是所有资源类型,下面是资源组,资源组下面是资源,如果有使用的就会列出这个资源所使用的资源类型!你现在只是创建了一个资源组,还没有添加任何资源,怎么去知道你有使用哪个资源类型,没有使用哪些资源类型啊!!!!!!!

汗死了,是我写的你看不明白,还是。。。。
作者: Philmoon    时间: 2007-08-13 16:24
原帖由 Hickory 于 2007-8-13 16:11 发表


我的理解是resource type是Cluster用来管理某一类资源的一整套方法的集合。具体来说,就是管理某资源的启动,停止以及监控运行状态的一堆脚本或者二进制文件。


恐怕还没到管理那一步,我理解是对resource的定义。不同的resource,需要的参数是不一样的:比如IP,需要的是IP和具体的网口;而文件系统,则需要设备名、安装路径,等等。定义了resource type后,引用某个资源,就一定带出涉及的参数,引用时参数的个数、名称都标准化了。这有点象c语言中的.h文件:如果没有include适当的.h文件,那么调用函数时要报错的。

管理服务(不是资源,资源是服务所需要使用的东东)的启动、停止、监控等脚本是包括在agent中的,一般还应包括测试、重起、失败处理等方法。
作者: 东方蜘蛛    时间: 2007-08-13 16:27
原帖由 OpenSolari 于 2007-8-13 16:04 发表
LZ,resource type是啥子东西?

sun cluster里面的资源类型由以下内容组成:在群集上运行的软件应用程序、由RGM 用作回调方法以管理作为群集资源的应用程序的控制程序以及一组构成部分静态群集配置的特性。RGM使用资源类型特性来管理特定类型的资源。
作者: Hickory    时间: 2007-08-13 16:29
有了。

找到如何察看已经安装,但是尚未注册的resource type了。看我的操作:

# scrgadm -a -t SUNW.oracle_listener
Registration file not found for "SUNW.oracle_listener" in /usr/cluster/lib/rgm/rtreg.
# ls -l /usr/cluster/lib/rgm/rtreg
total 84
-r-xr-xr-x   1 root     bin         4121 Jul 19 05:12 SUNW.Event
-r-xr-xr-x   1 root     bin         2855 Jul 19 05:09 SUNW.HAStorage
-r-xr-xr-x   1 root     bin         4836 Jul 19 05:09 SUNW.HAStoragePlus
-r-xr-xr-x   1 root     bin         3336 Jul 19 05:08 SUNW.LogicalHostname
-r-xr-xr-x   1 root     bin         3231 Jul 19 05:11 SUNW.RGOffload
-r-xr-xr-x   1 root     bin         3828 Jul 19 05:09 SUNW.SharedAddress
lrwxrwxrwx   1 root     root          46 Jul  6  2007 SUNW.dsldap -> ../../../../../etc/ds/v5.2/cluster/SUNW.dsldap
lrwxrwxrwx   1 root     other         27 Jul  6  2007 SUNW.gds -> /opt/SUNWscgds/etc/SUNW.gds
lrwxrwxrwx   1 root     other         34 Jul  6  2007 SUNW.hadb -> /opt/SUNWschadb/hadb/etc/SUNW.hadb
lrwxrwxrwx   1 root     other         40 Jul  6  2007 SUNW.hadb_ma -> /opt/SUNWschadb/hadb_ma/etc/SUNW.hadb_ma
lrwxrwxrwx   1 root     other         27 Jul  6  2007 SUNW.ims -> /opt/SUNWscims/etc/SUNW.ims
lrwxrwxrwx   1 root     other         27 Jul  6  2007 SUNW.iws -> /opt/SUNWschtt/etc/SUNW.iws
lrwxrwxrwx   1 root     other         34 Jul  6  2007 SUNW.jsas -> /opt/SUNWscs1as/jsas/etc/SUNW.jsas
lrwxrwxrwx   1 root     other         40 Jul  6  2007 SUNW.jsas-na -> /opt/SUNWscs1as/jsas-na/etc/SUNW.jsas-na
lrwxrwxrwx   1 root     root          50 Jul  6  2007 SUNW.mps -> ../../../../../etc/mps/admin/v5.2/cluster/SUNW.mps
lrwxrwxrwx   1 root     other         29 Jul  6  2007 SUNW.s1as -> /opt/SUNWscs1as/etc/SUNW.s1as
lrwxrwxrwx   1 root     other         29 Jul  6  2007 SUNW.s1mq -> /opt/SUNWscs1mq/etc/SUNW.s1mq
lrwxrwxrwx   1 root     other         29 Jul  6  2007 SUNW.scics -> /opt/SUNWscics/etc/SUNW.scics
-r-xr-xr-x   1 root     bin         4307 Jul 19 05:08 SUNW.scmasa

看起来,所有在/usr/cluster/lib/rgm/rtreg目录下的内容都可以被注册到cluster里来,但是干什么用的就不知道了。

多谢蜘蛛的帮忙。


# scrgadm -pv

Res Type name:                                     SUNW.LogicalHostname:2
  (SUNW.LogicalHostname:2) Res Type description:   Logical Hostname Resource Type
  (SUNW.LogicalHostname:2) Res Type base directory: /usr/cluster/lib/rgm/rt/hafoip
  (SUNW.LogicalHostname:2) Res Type single instance: False
  (SUNW.LogicalHostname:2) Res Type init nodes:    All potential masters
  (SUNW.LogicalHostname:2) Res Type failover:      True
  (SUNW.LogicalHostname:2) Res Type version:       2
  (SUNW.LogicalHostname:2) Res Type API version:   2
  (SUNW.LogicalHostname:2) Res Type installed on nodes: <All>
  (SUNW.LogicalHostname:2) Res Type packages:      SUNWscu
  (SUNW.LogicalHostname:2) Res Type system:        True

Res Type name:                                     SUNW.SharedAddress:2
  (SUNW.SharedAddress:2) Res Type description:     HA Shared Address Resource Type
  (SUNW.SharedAddress:2) Res Type base directory:  /usr/cluster/lib/rgm/rt/hascip
  (SUNW.SharedAddress:2) Res Type single instance: False
  (SUNW.SharedAddress:2) Res Type init nodes:      All nodes
  (SUNW.SharedAddress:2) Res Type failover:        True
  (SUNW.SharedAddress:2) Res Type version:         2
  (SUNW.SharedAddress:2) Res Type API version:     2
  (SUNW.SharedAddress:2) Res Type insta
作者: Hickory    时间: 2007-08-13 16:35
刚才没贴全,:wink:

Res Type name:                                     SUNW.Event
  (SUNW.Event) Res Type description:               HA Event server for Sun Cluster
  (SUNW.Event) Res Type base directory:            /usr/cluster/lib/rgm/rt/haevent
  (SUNW.Event) Res Type single instance:           False
  (SUNW.Event) Res Type init nodes:                All potential masters
  (SUNW.Event) Res Type failover:                  False
  (SUNW.Event) Res Type version:                   1.0
  (SUNW.Event) Res Type API version:               2
  (SUNW.Event) Res Type installed on nodes:        <All>
  (SUNW.Event) Res Type packages:                  <NULL>
  (SUNW.Event) Res Type system:                    False

Res Type name:                                     SUNW.dsldap
  (SUNW.dsldap) Res Type description:              Sun Java(TM) System Directory Server on Sun Cluster
  (SUNW.dsldap) Res Type base directory:           /usr/ds/v5.2/bin/cluster
  (SUNW.dsldap) Res Type single instance:          False
  (SUNW.dsldap) Res Type init nodes:               All potential masters
  (SUNW.dsldap) Res Type failover:                 True
  (SUNW.dsldap) Res Type version:                  5.2
  (SUNW.dsldap) Res Type API version:              2
  (SUNW.dsldap) Res Type installed on nodes:       <All>
  (SUNW.dsldap) Res Type packages:                 SUNWdsha
  (SUNW.dsldap) Res Type system:                   False
作者: Hickory    时间: 2007-08-13 16:45
原帖由 Philmoon 于 2007-8-13 16:24 发表


恐怕还没到管理那一步,我理解是对resource的定义。不同的resource,需要的参数是不一样的:比如IP,需要的是IP和具体的网口;而文件系统,则需要设备名、安装路径,等等。定义了resource type后,引用某个 ...



理解差不多,74我就是这个意思,没说好。
作者: Hickory    时间: 2007-08-13 16:47
其实,个人感觉,Sun Cluster里的resource type和Veritas的VCS里的Agent是一个概念吧!?
作者: Syrita    时间: 2007-08-13 17:34
原帖由 OpenSolari 于 2007-8-13 16:04 发表
LZ,resource type是啥子东西?



按照我的理解就是 cluster软件的启动停止脚本的模版,然后再改吧改吧就可以用来控制应用程序的起停了。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2