VCS技能总结Word文档下载推荐.docx
- 文档编号:6474964
- 上传时间:2023-05-06
- 格式:DOCX
- 页数:27
- 大小:458.78KB
VCS技能总结Word文档下载推荐.docx
《VCS技能总结Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《VCS技能总结Word文档下载推荐.docx(27页珍藏版)》请在冰点文库上搜索。
针对各种资源,可以开发各种Agent,VCS就是通过Agent来控制各种资源,例如导入数据库,启动等等各种操作。
有个朋友说过一句”Agent的成熟度决定了一个产品的成熟度”,呵呵,很有道理啊
(4)ResourceDependencies
恩,任何东西都有依赖性,何况资源阿,例如启动一个web服务资源,应该先把网卡和IP启动吧,如果网卡资源有问题,这台机器上所有的资源差不多都应高FAILOVER了,这就是依赖性。
(5)Heartbeat
心跳,主流的保持集群同步的方式,就看大家谁做的好了。
VERITAS整个通讯基本都是自己写的,主要包括LLT(LOWLatencyThansport)和GAB(GroupMembershipandAtomicBroadcast)。
LLT依赖于MAC地址实现稳定的底层协议,GAB基于LLT,实现VCS资源的同步。
关于LLT和GAB有很多内容,这里就不叙述了。
(6)Splitbrian
如果一个集群由于网络原因被分成了2个和多个部分,资源该在哪些机器上启动呢,这个问题涉及内容很多,以后再讨论。
2、VCS日常维护
输入License
#vxlicinst
查看License:
#vxlicrep
查看磁盘:
(STATUS为onlineinvalid,不受vxvm管理;
为Online,受vxvm管理)
#vxdisklist
查看磁盘组:
#vxdglist
查看卷:
(输出中dg是磁盘组,dm是磁盘,v是卷,pl是plex,sd是子磁盘。
每个卷与关联的plex和子磁盘一起列出。
正常工作时状态应该为ACTIVE,内核状态为ENABLED,表示卷已经启动)
#vxprint
Cluster状态检查:
#hastatus-summary
检查机器上日志文件:
#tail-f/var/VRTSvcs/log/engine_A.log
检查服务组的状态
#hagrp-stateservice_group-syssystem_name
检查main的语法:
(语法正确将没有任何返回结果)
#haconf/hacf-verify/etc/VRTSvcs/conf/config
切换服务资源:
#hagrp-switchservice_group-tosystem_name
停止资源监控:
(此时可以对资源进行手工启停操作。
在资源(例如:
cg)需要手工启停的时候,需要冻结资源组,然后进行资源的手工操作)
#hagrp-freezeservice_group
启动资源监控:
(资源手工操作后,需要恢复正常运行模式)
#hagrp-unfreezeservice_group
清除错误信息:
(如果系统中显示error信息后,不能正常切换,需要清除error信息)
#hagrp-clearservice_group
停掉所有的VCS:
#hastop-all-force
停止本机上的VCS:
#hastop
启动本机上的VCS:
#hastart
强制启动VCS:
(如果main.cf被修改后,不能启动vcs,需要强制启动)
#hastart-force
启动VCS的图形界面,/opt/VRTSvcs/bin/hagui,默认的用户名和密码分别是admin、password,在安装过程中可以选择添加其他的用户
3、VCS胶片总结
servicegroup
A“servicegroup”isacollectionofresourcesthatmonitorthestatusofanapplication(服务组是各种监控应用状态的资源的集合);
Applicationfailoveriscontrolledbytheservicegroup(应用的失效转移是由服务组来控制的)
Active/PassiveClustering(主备方式)“asymmetricconfiguration”(非对称配置):
每个主机都需要一个专用的备机做备份,成本很高,实际中不适用。
Active/ActiveClustering(互备方式)“symmetricconfiguration”(对称配置):
两个节点提供不同的服务,互相备用,当一个节点故障,服务马上有第二个节点接管服务
基本概念和术语:
集群
•Severalnetworkedsystems几个节点
•Sharedstorage共享存储
•Singleadministrativeentity单个管理节点
•Peermonitoring相互监控
systems系统
•Membersofacluster集群的一个成员
•Referredtoasnodes也称之为节点
•Containcopiesof:
包括如下内容
›Communicationprotocolconfigurationfiles通信协议的配置文件
›VCSconfigurationfilesVCS的配置文件
›VCSlibrariesanddirectoriesVCS的库文件和安装目录
›VCSscriptsanddaemonsVCS的脚本和后台程序
•Shareasingledynamicclusterconfiguration共享一个动态的集群配置
•Provideapplicationservices提供应用的服务
ServiceGroups服务组
•Aservicegroupisarelatedcollectionofresources.服务组是资源的一个集合
•Resourcesinaservicegroupmustbeavailabletothesystem.服务组中的资源在系统中必须是可用的
•Resourcesandservicegroupshaveinterdependencies.服务组和资源存在相互依赖关系
ServiceGroupTypes服务组的类型
•Failover失效转移
›Canbepartiallyorfullyonlineononlyoneserveratatime同一时间只能在一台机器上运行
›VCScontrolsstoppingandrestartingtheservicegroupwhencomponentsfail当服务组某个资源出错时,VCS控制它的停止和重启
•Parallel并行
›Canbepartiallyorfullyonlineonmultipleserverssimultaneously可以同时在多台机器上运行
›Examples:
–OracleParallelServer
–Web,FTPservers
Resources资源
•VCSobjectsthatcorrespondtohardwareorsoftwarecomponents包括软件和硬件组件
•MonitoredandcontrolledbyVCS通过VCS来监控和控制
•Classifiedbytype通过资源类型分类
•Identifiedbyuniquenamesandattributes通过唯一的名称和属性来标识
•Candependonotherresourceswithinthesameservicegroup在同一服务组中可依赖其他资源
ResourceTypes资源类型
•Generaldescriptionoftheattributesofaresource通常描述一种资源的属性
•ExampleMountresourcetypeattributes:
例如mount资源类型的属性
›MountPoint挂载点
›BlockDevice挂载设备
•Otherexampleresourcetypes:
其他类型的资源
›Disk磁盘
›Share共享
›IP浮动IP
›NIC网卡
Agents代理
•Processesthatcontrolresources控制资源的程序
•Oneagentperresourcetype每种类型的资源对应一个代理
•Agentcontrolsallresourcesofthattype.一个代理控制对应类型的所有资源
•AgentscanbeaddedintoVCSagentframework.用户可以加入自己的代理到VCS的框架中
Dependencies依赖关系
•Resourcescandependonotherresources.资源可以依赖其他资源
•Parentresourcesdependonchildresources.父资源依赖子资源
•Servicegroupscandependonotherservicegroups.服务组可以依赖其他服务组
•Resourcetypescandependonotherresourcetypes.资源类型之间也存在依赖,比如IP类型必须依赖NIC类型
•Rulesgovernservicegroupandresourcedependencies.资源和服务组之间的依赖关系由规则管理
•Nocyclicdependenciesareallowed.不允许出现循环依赖
PrivateNetwork私有网络
•Minimumtwocommunicationchannelswithseparateinfrastructure:
至少需要两条独立的通信链路
›MultipleNICs(notjustports)多块网卡
›Separatehubs,ifused独立的hub
•Heartbeatcommunicationdetermineswhichsystemsaremembersofthecluster.心跳之间的通信决定哪些系统是集群的成员
•Clusterconfigurationbroadcastupdatesclustersystemswithstatusofeachresourceandservicegroup.集群中的资源和服务组的状态信息通过广播更新到各个节点
LowLatencyTransport(LLT)低时延传输协议
•Providesfast,kernel-to-kernelcommunications提供快速,内核到内核的通信
•Isconnectionoriented
•Isnotroutable不需要路由
•UsesDataLinkProviderInterface(DLPI)overEthernet使用以太网的链路层
GroupMembershipServices/AtomicBroadcast(GAB)
•Managesclustermembership管理集群成员
•Maintainsclusterstate维护集群状态
•Usesbroadcasts使用广播
•RunsinkerneloverLowLatencyTransport(LLT)运行在llt之上
VCSEngine(had)VCS的引擎
•Maintainsconfigurationandstateinformationforallclusterresources维护整个集群的所有资源的配置和状态信息
•UsesGABtocommunicateamongclustersystems通过gab与集群的其他成员通信
•Ismonitoredbyhashadowprocess由后台进程hashadow来监控
VCSArchitecture总体架构
管理集群服务:
集群配置—main.cf
启动VCS—hastart
Thehastartcommandstartsthehadandhashadowdaemons.
•Syntax:
hastart[-option]
•Options:
-stale
-force
•Example:
hastart-force
停止VCS—hastop
ThehastopcommandstopstheVCSengine.
hastop–option[arg][-option]
-local[-force|-evacuate退出]
-syssys_name[-force|-evacuate]
-all[-force]
hastop-systrain4-evacuate
ThehastatusCommandDisplaysstatusofitemsinthecluster.
hastatus-option[arg][-optionarg]
-groupservice_group
-sum[mary]
hastatus-groupOracleSG
ProtectingtheClusterConfiguration保护集群的配置
1.Clusterconfigurationopened;
.stalefilecreated
2.Resourcesaddedtoclusterconfigurationinmemory;
main.cfoutofsyncwithmemoryconfiguration
3.Changessavedtodisk;
.staleremoved
Thehaconfcommandopens,closes,andsavestheclusterconfiguration.
haconf–option[-option]
-makerwOpensconfiguration
-dumpSavesconfiguration
-dump–makeroSavesandclosesconfiguration
haconf-dump-makero
Altersorqueriesstateofhad
hasys–option[arg]
-forcesystem_name
-list
-displaysystem_name
-deletesystem_name
-addsystem_name
hasys-forcetrain11ForcingaSystemtoStart
配置文件的传播
1.StopVCSonallsystemsintheclusterandleaveapplicationsrunning:
hastop-all-force
2.StartVCSstaleonallothersystems:
hastart-stale
The-staleoptioncausesthesesystemstowaituntilarunningconfigurationisavailablefromwhichtheycanbuild.
3.StartVCSonthesystemwiththemain.cfthatyouarepropagating:
hastart
验证集群配置
Thehacfutilitychecksthesyntaxofthemain.cffile.
hacf-verifyconfig_directory
hacf-verify/etc/VRTSvcs/conf/config
修改集群属性
Thehacluscommandisusedtoviewandchangeclusterattributes.
haclus–option[arg]
-display
-help[-modify]
-modifymodify_options
-valueattribute
-notes
haclus–valueClusterLocation
启动的状态和迁移
停止的状态和迁移
Troubleshooting
从以下几个方面来监控VCS:
•VCS的日志文件
•系统的日志文件
•使用hastatus命令查看VCS的状态
•SNMP
•事件告警机制
•集群管理图形界面clustermanager
VCSLogEntries
•VCS引擎日志:
/var/VRTSvcs/log/engine_A.log
•通过GUI图形界面查看日志或者hamsg命令:
•hamsgengine_A
代理日志:
AgentLogEntries
•代理日志在/var/VRTSvcs/log目录下面
•日志文件用AgentName_A.log来命名,如:
IP_A.log
•日志级别的设置:
•none、error(默认设置)、info、debug、all
•通过命令来改变日志级别:
•hatype-modifyres_typeLogLeveldebug
集群通信问题解决:
•使用命令hastatus–summary检查VCS
•如果输出类似如下,则表明集群之间的通信有问题
•VCS:
11307:
Nodehasnotreceivedclustermembershipyet,cannotprocessHAcommand
•如果输出类似如下,则表明VCS的引擎启动有问题
•hatest1STALEADMINWAIT:
allsystemstale
•首先用lltconfig命令检查llt模块是否是running状态,如果不是检查/etc/llttab文件
LLT模块问题解决:
•检查/etc/llthost文件,主机名必须与/etc/llttab中的主机名保持一致,主机序列号必须在0-31范围内
•如果llt的状态是running,用命令lltstat–n检查是否所有的心跳线都是好的(请先确认在/etc/llttab中配置的网卡是否都是UP状态的,可以用ifconfig查看),类似输出如下:
•LLTnodeinformation:
•NodeStateLinks
•*0test-smc3OPEN3
•1storage-1OPEN3
GAB模块问题解决:
•首先检查GAB模块是否已经运行,gabconfig–a
•如果输出如下,则表明GAB模块有问题,请检查/etc/gabtab文件,
•GABPortMemberships
•如果GAB一启动马上关闭了,请检查LLT模块是否有问题
•如果没有h端口的输出则表明HAD有问题,正常的输出如下:
•===================================================
•Portagena76401membership01
•Porthgena76404membership01
HAD模块问题解决
•首先确认LLT模块和GAB模块已经正确启动
•使用hacf–verify/etc/VRTSvcs/conf/config检查VCS的配置文件是否配置正确,无输出则表明是正确的
•确认VCS的license是否是正确的:
vxlicrep,如果输出类似如下,则需要重新输入license
•vxlicrepERRORV-21-3-1003TherearenovalidVERITASLicensekeysinstalledinthesystem.
•重新输入有效的lic
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- VCS 技能 总结