登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

herb

喜欢写博,喜欢安静,喜欢挑战!

 
 
 

日志

 
 

HA配置文件中英对照之haresources  

2011-01-17 19:35:52|  分类: Linux Cluster |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
#
# This is a list of resources that move from machine to machine as
# nodes go down and come up in the cluster.  Do not include
# "administrative" or fixed IP addresses in this file.
# 这是当集群中的节点拓机和启动时从一台机器转移到另一台机器的resources列表,不要包含管理或已用IP地址在这个文件中。
#
# <VERY IMPORTANT NOTE>
# The haresources files MUST BE IDENTICAL on all nodes of the cluster.
# 此haresources文件在所有的集群节点中都必须相同
# The node names listed in front of the resource group information
# is the name of the preferred node to run the service.  It is
# not necessarily the name of the current machine.  If you are running
# auto_failback ON (or legacy), then these services will be started
# up on the preferred nodes - any time they're up.
# 列在resource组信息前的节点名称是优先运行服务的节点名称,它不需要是当前机器的名称,如果你运行auto_failback on(或者
# legacy),那么这些服务将会在优先节点启动,只要它们是运行的。
#
# If you are running with auto_failback OFF, then the node information
# will be used in the case of a simultaneous start-up, or when using
# the hb_standby {foreign,local} command.
# 如果你运行auto_failback off,那么节点信息将使用在同时启动的情况,或当使用hb_standby {foreign,local}命令时。

# BUT FOR ALL OF THESE CASES, the haresources files MUST BE IDENTICAL.
# If your files are different then almost certainly something
# won't work right.
# 但是对于所有的这些情况,此haresources文件都必须相同。如果你的文件不同那么肯定有某些东西将不能正常工作。
# </VERY IMPORTANT NOTE>
#

# We refer to this file when we're coming up, and when a machine is being
# taken over after going down.
# 我们在起动的时候和一个机器停机后被接管的时候参考这个文件。
#
# You need to make this right for your installation, then install it in
# /etc/ha.d
# 你必须让它符合你的安装,然后安装它到/etc/ha.d目录。
#
# Each logical line in the file constitutes a "resource group".
# A resource group is a list of resources which move together from
# one node to another - in the order listed.  It is assumed that there
# is no relationship between different resource groups.  These
# resource in a resource group are started left-to-right, and stopped
# right-to-left.  Long lists of resources can be continued from line
# to line by ending the lines with backslashes ("\").
# 在文件里面的每个逻辑行组成一个“resource group”。一个resource group就是从一个节点移动到另一个的resources的列表。
# 可以假设不同的resource groups之间是没有关系的。resource group的resource启动时是从左到右的。关闭时是从右到左的。
# 长的resources列表可以以反斜杠(“\”)结尾来续行。
#
# These resources in this file are either IP addresses, or the name
# of scripts to run to "start" or "stop" the given resource.
# 在 这个文件里面的resources可以是IP地址,也可以是用于“start”或“stop”给定的resource的脚本名称
#
# The format is like this:
#
#node-name resource1 resource2 ... resourceN
#
#
# If the resource name contains an :: in the middle of it, the
# part after the :: is passed to the resource script as an argument.
#       Multiple arguments are separated by the :: delimeter
# 如果resource的名称包含一个::在它的中间,在::后面的部分会传递给resource的脚本中作为一个参数,多个参数会以::分割。
#
# In the case of IP addresses, the resource script name IPaddr is implied.
# 在IP地址的情况中,resource脚本名称IPaddr是隐含的。
#
# For example, the IP address 135.9.8.7 could also be represented
# as IPaddr::135.9.8.7
# 例如:IP地址135.9.8.7也可以被表现为IPaddr::135.9.8.7
#
# THIS IS IMPORTANT!!     vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
#
# The given IP address is directed to an interface which has a route
# to the given address.  This means you have to have a net route
# set up outside of the High-Availability structure.  We don't set it
# up here -- we key off of it.
# 给定的IP地址会直接连到有路由到给定的地址的接口上,这也就意味着你必须要在 High-Availability 外部配置一个网络路由。我们不在这里配置,我们切断它。
#
# The broadcast address for the IP alias that is created to support
# an IP address defaults to the highest address on the subnet.
# IP别名的广播地址将被缺省创建为支持IP地址的子网里的最高地址
#
# The netmask for the IP alias that is created defaults to the same
# netmask as the route that it selected in in the step above.
# IP别名的子网掩码将被缺省创建为与上面选择的路由相同的子网掩码
#
# The base interface for the IPalias that is created defaults to the
# same netmask as the route that it selected in the step above.
# IP别名的基础接口将被缺省创建为与上面选择的路由相同的子网掩码
#
# If you want to specify that this IP address is to be brought up
# on a subnet with a netmask of 255.255.255.0, you would specify
# this as IPaddr::135.9.8.7/24 . 
# 如果你想要指定某个IP地址用指定的子网掩码来启动,那么像这样指定它 IPaddr::135.9.8.7/24
#
# If you wished to tell it that the broadcast address for this subnet
# was 135.9.8.210, then you would specify that this way:
#  IPaddr::135.9.8.7/24/135.9.8.210
# 如果你想要指明这个子网的广播地址为135.9.8.210,那么可以像这样指定 IPaddr::135.9.8.7/24/135.9.8.210
#
# If you wished to tell it that the interface to add the address to
# is eth0, then you would need to specify it this way:
#  IPaddr::135.9.8.7/24/eth0
# 如果你希望指明要增加地址的接口是eth0,那么你需要像这样指定 IPaddr::135.9.8.7/24/eth0
#
#       And this way to specify both the broadcast address and the
#       interface:
#  IPaddr::135.9.8.7/24/eth0/135.9.8.210
# 同时指定广播地址和接口的方法为:
#  IPaddr::135.9.8.7/24/eth0/135.9.8.210
#
# The IP addresses you list in this file are called "service" addresses,
# since they're the publicly advertised addresses that clients
# use to get at highly available services.
# 列表在这个文件中的IP地址叫做服务地址,它们是客户端用于获取高可用服务的公共通告地址
#
# For a hot/standby (non load-sharing) 2-node system with only a single service address,
# you will probably only put one system name and one IP address in here.
# The name you give the address to is the name of the default "hot"
# system.
# 对于一个hot/standby(非共享负载)单服务地址的双节点系统,你可能只需要放置一个系统名称和一个IP地址在这里。你给定的地址对应的名字就是缺省的hot系统的名字。
#
# Where the nodename is the name of the node which "normally" owns the
# resource.  If this machine is up, it will always have the resource
# it is shown as owning.
# 节点名称就是正常情况下拥有resource的节点的名称。如果此机器是up的,他将一直拥有以拥有显示的resource。
#
# The string you put in for nodename must match the uname -n name
# of your machine.  Depending on how you have it administered, it could
# be a short name or a FQDN.
# 设置作为节点名称的字符串必须匹配在机器上使用uname -n获得的名字。基于你如果进行管理,它可能是一个缩写名称或一个FQDN。
#
#-------------------------------------------------------------------
#
# Simple case: One service address, default subnet and netmask
#  No servers that go up and down with the IP address
# 简单情况:一个服务地址,缺省子网和掩码,没有服务与IP地址一起启动和关闭
#
#just.linux-ha.org 135.9.216.110
#
#-------------------------------------------------------------------
#
# Assuming the adminstrative addresses are on the same subnet...
# A little more complex case: One service address, default subnet
# and netmask, and you want to start and stop http when you get
# the IP address...
# 假定管理地址在相同的子网...
# 稍微复杂一些的情况:一个服务地址,缺省子网和子网掩码,同时你要在获得IP地址的时候启动和停止http。
#
#just.linux-ha.org 135.9.216.110 http
#-------------------------------------------------------------------
#
# A little more complex case: Three service addresses, default subnet
# and netmask, and you want to start and stop http when you get
# the IP address...
# 稍微复杂一些的情况:三个服务地址,缺省子网和掩码,同时你要在获得IP地址的时候启动和停止http。
#
#just.linux-ha.org 135.9.216.110 135.9.215.111 135.9.216.112 httpd
#-------------------------------------------------------------------
#
# One service address, with the subnet, interface and bcast addr
#       explicitly defined.
# 一个服务地址,显式指定子网,接口,广播地址
#
#just.linux-ha.org 135.9.216.3/28/eth0/135.9.216.12 httpd
#
#-------------------------------------------------------------------
#
#       An example where a shared filesystem is to be used.
#       Note that multiple aguments are passed to this script using
#       the delimiter '::' to separate each argument.
# 一个使用共享文件系统的例子
# 需要注意用'::'分隔的多个参数被传递到了这个脚本
#
#node1  10.0.0.170 Filesystem::/dev/sda1::/data1::ext2
#
# Regarding the node-names in this file:
# 关于这个文件中的节点名称:
# They must match the names of the nodes listed in ha.cf, which in turn
# must match the `uname -n` of some node in the cluster.  So they aren't
# virtual in any sense of the word.
# 它们必须匹配在ha.cf中列出的节点名称,依次必须匹配集群中的某些节点'unmae -n'的结果。所以它们不是对于词的虚假感觉。

#   原文地址 http://blog.chinaunix.net/u2/67390/showart_1905536.html 

  评论这张
 
阅读(688)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018