ºìÁªLinuxÃÅ»§
Linux°ïÖú

Sun Cluster 3.0 µÄ¹æ»®¡¢°²×°¡¢ÅäÖü°¹ÜÀí

·¢²¼Ê±¼ä:2006-10-06 12:26:44À´Ô´:ºìÁª×÷Õß:lgms2008
Ò»¡¢ Sun ClusterµÄ»ù±¾¸ÅÄ
1. Sun Cluster3.0Ö§³ÖµÄÁ½ÖÖ·þÎñģʽ£º
Failover(ʧ°ÜÇл»)£ºµ±¹ÊÕÏ·¢Éúʱ£¬ÏµÍ³×Ô¶¯½«Ó¦ÓóÌÐòµÈ×ÊÔ´£¨APP¡¢IP¡¢DATA£©Ò»¸ö¹ÊÕÏÖ÷½ÚµãÉÏÖØж¨Î»µ½Ö¸¶¨µÄ¸¨Öú½Úµã£¬¿Í»§¿ÉÄܻῴµ½Ò»¸ö¶ÌÔݵķþÎñÖжϣ¨Ò»°ãΪ10s£©,²¢¿ÉÄÜÐèÒªÔÚʧ°ÜÇл»½áÊøºóÖØÐÂÁ¬½Ó£¬µ«¿Í»§²¢²»ÖªµÀÄÄÒ»¸öÎïÀí·þÎñÆ÷ÏòËûÃÇÌṩӦÓóÌÐòºÍÊý¾Ý¡£×öµ½ÁËÓ¦ÓóÌÐòµÄÈßÓà¡£
Scalable(¿ÉÉìËõ)£ºÀûÓü¯ÈºÖеĶà¸ö½ÚµãÀ´Í¬Ê±ÔËÐÐÒ»¸öÓ¦ÓóÌÐò£¬Ã¿¸ö½Úµã¶¼¿ÉÒÔÌṩÊý¾ÝºÍ´¦Àí¿Í»§ÇëÇó£¬ÕâÑù¼ÈÌṩÁ˸߿ÉÓÃÐÔ£¬»¹ÌṩÁ˸ü¸ßµÄÐÔÄÜ¡£
Sun Cluster3.0µ¥Ò»¼¯Èº¼È¿ÉÒÔÖ§³Öʧ°ÜÇл»Ó¦ÓóÌÐò£¬Ò²¿ÉÒÔÖ§³Ö¿ÉÉìËõÓ¦ÓóÌÐò,¶ø2.2Ö»Ö§³Öʧ°ÜÇл»Ó¦ÓóÌÐò¡£
2£®Ë«½ÚµãȺ¼¯ÅäÖÃÑùÀý£º
Ⱥ¼¯½Úµã£ºÊÇͬʱÔËÐÐSolaris ²Ù×÷ϵͳºÍSun Cluster Èí¼þµÄ»úÆ÷£¬ËüҪôÊÇȺ¼¯µÄµ±
Ç°³ÉÔ±(cluster member)£¬ÒªÃ´ÊÇDZÔÚ³ÉÔ±¡£Sun Cluster3.0 Èí¼þʹÄú¿ÉÔÚÒ»¸öȺ¼¯Öв¿ÊðÁ½µ½°Ë¸ö½Úµã,¶ø2.2Ö»Ö§³Öµ½4¸ö½Úµã¡£
Ⱥ¼¯Ãû£ºÈº¼¯ÖеÄËùÓнڵ㶼»á¹é×éµ½Ò»¸ö¼¯ÈºÃû³ÆÏÂ--ÓÃÓÚ·ÃÎʺ͹ÜÀíȺ¼¯¡£Èçscmail
¹«¹²ÍøÂçÊÊÅäÆ÷£¨nafo£©£º¿Í»§»úͨ¹ý¹«¹²ÍøÂç½Ó¿ÚÓëȺ¼¯ÏàÁ¬¡£Ã¿¸öÍøÂçÊÊÅäÆ÷¿¨¿ÉÁ¬½ÓÒ»¸ö»ò¶à¸ö¹«¹²ÍøÂ磬ÕâÈ¡¾öÓÚ¿¨ÉÏÊÇ·ñ¾ßÓжà¸öÓ²¼þ½Ó¿Ú¡£¿ÉÒÔÉèÖýڵ㣬ʹ֮°üº¬¶à¸ö¹«¹²ÍøÂç½Ó¿Ú¿¨£¬½«Ò»¸ö¿¨ÅäÖÃΪ»î¶¯¿¨£¬ÆäËû¿¨×÷Ϊ±¸·Ý¿¨¡£³ÆΪ¡°¹«¹²ÍøÂç¹ÜÀí¡±(PNM) µÄSun Cluster Èí¼þµÄ×Óϵͳ¼àÊÓׯ¿¨¡£Èç¹û»î¶¯ÊÊÅäÆ÷³öÏÖ¹ÊÕÏ£¬Ôòµ÷ÓÃNetworkAdapter Failover (NAFO) Èí¼þ½øÐÐʧ°ÜÇл»£¬½«½Ó¿ÚÇл»ÖÁÒ»¸ö±¸·ÝÊÊÅäÆ÷¡£
˽Íø£¨private networks£©£ºÈº¼¯³ÉԱͨ¹ýÎïÀíÉ϶ÀÁ¢µÄÒ»¸ö»ò¶à¸öÍøÂ磨private networks£©ÓëȺ¼¯ÖеÄÆäËû½ÚµãͨÐÅ£¬ÖªµÀÁíÒ»½ÚµãµÄ¼ÓÈë»òÀ뿪
¹ÜÀí¿ØÖÆ̨:¿ÉÒÔʹÓÃרÓÃSPARCstationTM ϵͳ£¨³ÆΪ¹ÜÀí¿ØÖÆ̨£©À´¹ÜÀí»î¶¯Èº¼¯¡£Í¨³£ÔÚ¹ÜÀí¿ØÖÆ̨ÉÏ°²×°²¢ÔËÐеĹÜÀí¹¤¾ßÈí¼þÓÐCluster Control Panel (CCP) ºÍSunManagement Center ²úÆ·µÄSun Cluster Ä£¿é¡£ËüµÄʹÓÿÉÒÔʹ¿ØÖÆ̨ºÍ¹ÜÀí¹¤¾ß¹é×鵽ͬһ»úÆ÷ÉÏ£¬ÊµÏÖ¼¯Öл¯µÄȺ¼¯¹ÜÀí¡£
¿ØÖÆ̨·ÃÎÊÉ豸£ºSun Ö»ÌṩһÖÖÖ§³ÖµÄÖն˼¯ÏßÆ÷¡£Äú¿ÉÑ¡ÔñʹÓÃÖ§³ÖµÄSun Öն˼¯ÏßÆ÷¡£Öն˼¯ÏßÆ÷ͨ¹ýʹÓÃTCP/IP ÍøÂçʵÏÖ¶Ôÿһ½ÚµãÉÏttya µÄ·ÃÎÊ¡£ÕâÑù¾Í¿É´ÓÍøÂçÉϵÄÈÎÒ»Ô¶³Ì¹¤×÷Õ¾¶Ôÿһ½Úµã½øÐпØÖÆ̨¼¶±ðµÄ·ÃÎÊ¡£
3£®É豸±êʶ(DID)
Sun Cluster ͨ¹ýÒ»ÖÖ½Ð×öÉ豸±êʶ(DID) αÇý¶¯³ÌÐòµÄ½á¹¹À´¹ÜÀíÈ«¾ÖÉ豸¡£´ËÇý¶¯³ÌÐò¿É×Ô¶¯¸øȺ¼¯ÖеÄÿ¸öÉ豸·ÖÅäΨһµÄ±êʶ£¬°üÀ¨¶àÖ÷»ú´ÅÅÌ¡¢´Å´øÇý¶¯Æ÷ºÍCD-ROM¡£ÉèÖ´ÐжÔÈ«¾ÖÉ豸µÄ·ÃÎÊʱʹÓõÄÊÇDID Çý¶¯³ÌÐò·ÖÅäµÄΨһÉ豸±êʶ£¬¶ø·Ç´«Í³µÄSolaris É豸ID£¨Èçijһ´ÅÅ̵ıêʶc0t0d0£©¡£ÕâÒ»´ëÊ©¿É±£Ö¤ÈκÎʹÓôÅÅÌÉ豸µÄÓ¦ÓóÌÐò£¨Èç¾í¹ÜÀíÆ÷»òʹÓÃԭʼÉ豸µÄÓ¦ÓóÌÐò£©¶¼¿ÉʹÓÃһֵķ¾¶·ÃÎÊÉ豸¡£ÀýÈ磬½Úµã1 ¿ÉÄܽ«Ò»¸ö¶àÖ÷»ú´ÅÅÌ¿´×÷c1t2d0£¬¶ø½Úµã2 ¿ÉÄÜ»áÍêÈ«²»Í¬£¬ ½«Í¬Ò»´ÅÅÌ¿´×÷ÊÇc3t2d0¡£DID Çý¶¯³ÌÐòÔò»á·ÖÅäÒ»¸öÈ«¾ÖÃû³Æ£¬Èçd10£¬¹©½ÚµãʹÓã¬ÕâÑù¾ÍΪÿ¸ö½ÚµãÌṩÁ˵½¶àÖ÷»ú´ÅÅ̵ÄÒ»ÖÂÓ³Éä¡£
4. Quorum É豸
Sun Cluster ÅäÖÃʹÓÃquorum É豸ά»¤Êý¾ÝºÍ×ÊÔ´µÄÍêÕûÐÔ¡£Èç¹ûȺ¼¯ÔÝʱ¶ªÊ§Óë½ÚµãµÄÁ¬½Ó£¬Ôòquorum É豸×èÖ¹ÔÚȺ¼¯½ÚµãÊÔͼÖØÐÂÁ¬½ÓȺ¼¯Ê±³öÏÖ½¡Íü»òʹÈËÍ·ÌÛµÄÎÊÌ⡣ͨ¹ýʹÓÃscsetup(1M) ʵÓóÌÐòÀ´Ö¸¶¨quorum É豸¡£
¹æ»®quorum É豸ʱÇ뿼ÂÇÒÔϼ¸µã¡£
_ ×îСֵ- Á½¸ö½ÚµãµÄȺ¼¯±ØÐëÖÁÉÙÓÐÒ»¸ö·ÖÅäΪquorum É豸µÄ¹²Ïí´ÅÅÌ¡£¶ÔÓÚÆäËûÍØÆË£¬quorum É豸ÊÇ¿ÉÑ¡µÄ¡£
_ ÆæÊý¹æÔò- Èç¹ûÔÚÖ±½ÓÓëquorum É豸Á¬½ÓµÄÁ½¸ö½ÚµãµÄȺ¼¯»òÒ»¶Ô½ÚµãÖÐÅäÖöà¸öquorum É豸£¬ÔòÅäÖÃÆæÊý¸öquorum É豸£¬ÒÔ±ãÕâЩÉ豸ÓÐÍêÈ«¶ÀÁ¢µÄʧ°ÜͨµÀ¡£
_ Á¬½Ó- quorum É豸²»ÄÜÓëÁ½¸öÒÔÉϵĽڵãÁ¬½Ó¡£
¶þ¡¢ ×¼±¸¹¤×÷£º
1£®°²×°TC£¨¿ÉÑ¡£©
a. Á½Ì¨½Úµã»úµÄ´®¿ÚA·Ö±ð½Óµ½TCµÄ2¡¢3ºÅ¶Ë¿Ú£¬¹ÜÀí»úµÄ´®¿ÚAÁ¬½Óµ½TCµÄ1ºÅ¶Ë¿Ú
b. ÔÚ¹ÜÀí»úÉÏÐÞ¸ÄÎļþÈçÏ£º
#vi /etc/remote
hardware: dv=/dev/term/a:br#9600:el=^C^S^Q^U^D:ie=%$:oe=^D
c£®Ö´ÐÐ#tip hardwire,°´ÏÂTCÃæ°åÉϵÄtest¼ü£¬Ö±µ½PowerµÆÉÁ·Å¿ª
d£®ÔÚ°´Ò»ÏÂTCÃæ°åÉϵÄtest¼ü£¨2s£©
e£®¹ÜÀí»úµÄÆÁÄ»ÉÏÏÔʾmonitor::
ÓÃaddrÐÞ¸ÄTCµÄ IPµØÖ·£¬°´¡°~.Í˳ö¡±£¬ÖØÆðTC
f£®telnetµ½ TC,Ö´ÐÐ
annex: su
passwd: ;
annex# admin
g£®ÅäÖô®¿Úģʽ£º
admin: set port=1-8 type dial_in imask_7bits Y
admin: set port=2-8 mode slave ps_history_buffer 32767
admin: quit
annex#boot
2£®ÅäÖùÜÀí»ú£º£¨¿ÉÑ¡£©
a£® ÓÃrootÓû§µÇ½¹ÜÀí»ú£¬ÐÞ¸Ä/etc/hosts,½«ËùÓнڵã»úµÄÖ÷»úÃûºÍ¶ÔÓ¦µØַдÈë
b£® Ìí¼Ócluster console software
#pkgadd -d . SUNWccon
c£® ÐÞ¸Ä/.profileÎļþ
PATH=$PATH:/opt/SUNWcluster/bin
MANPATH=$MANPATH:/opt/SUNWcluster/man
Export PATH MANPATH
d. ʹprofileÉúЧ # . /.profile
e. ±à¼­/etc/clusters
cluster-name node1-name node2-name
f. ±à¼­/etc/serialports
node1-name TC-address 5002(ÔÚTCÉϵĶ˿ںÅ)
node2-name TC-address 5003
g. Ö´ÐÐ#ccp cluster-name & £¬Ê¹ÓÃclogin»òcconsole/ctelnet¹¤¾ß
3£®ÐÞ¸ÄSCSI Initiator Id
ÔÚ¶ÀÁ¢·þÎñÆ÷ÖУ¬·þÎñÆ÷½Úµãͨ¹ý½«´Ë·þÎñÆ÷Á¬½Óµ½Ìض¨SCSI ×ÜÏßµÄSCSI Ö÷»úÊÊÅäÆ÷Ïß·£¬À´¿ØÖÆSCSI ×ÜÏ߻¡£¸ÃSCSI Ö÷»úÊÊÅäÆ÷Ïß·³Æ×÷SCSI initiator¡£ËüÆô¶¯´ËSCSI ×ÜÏßµÄÈ«²¿×ÜÏ߻¡£Sun ϵͳÖÐSCSI Ö÷»úÊÊÅäÆ÷µÄȱʡSCSI µØÖ·ÊÇ7¡£Èº¼¯ÅäÖù²Ïí¶à¸ö·þÎñÆ÷½Úµã¼äµÄ´æ´¢Æ÷¡£µ±Èº¼¯´æ´¢Æ÷Óɵ¥¶Ë»ò²î·ÖSCSI É豸×é³Éʱ£¬ÕâÑùµÄÅäÖóÆ×÷¶àÆô¶¯Æ÷SCSI¡£ÕýÈç´ËÊõÓïµÄ×ÖÃ溬ÒåÄÇÑù£¬SCSI ×ÜÏßÉÏ´æÔÚ¶à¸öSCSI Æô¶¯Æ÷¡£SCSI ¹æ¸ñÐèÒªSCSI ×ÜÏßÉϵÄÿ¸öÉ豸¶¼¾ßÓÐΨһµÄSCSI µØÖ·¡££¨Ö÷»úÊÊÅäÆ÷Ò²ÊÇSCSI ×ÜÏßÉϵÄÉ豸¡££©ÒòΪËùÓÐSCSI Ö÷»úÊÊÅäÆ÷µÄȱʡSCSI µØÖ·¾ùΪ7£¬ËùÒÔ¶àÆô¶¯Æ÷»·¾³ÖеÄȱʡӲ¼þÅäÖûᵼÖ³åÍ»¡£Òª½â¾öÕâÒ»³åÍ»£¬ÇëÔÚÿ¸öSCSI ×ÜÏßÉϽ«Ò»¸öSCSI Ö÷»úÊÊÅäÆ÷µÄSCSI µØÖ·±£ÁôΪ7£¬ÔÚµÚ¶þ¸öÖ÷»úÊÊÅäÆ÷µÄSCSI µØÖ·¸ÄΪ6¡£
a. ok show-disks ¼ÇÏ¿ØÖÆÆ÷µÄ·¾¶
b. ´´½¨Ò»¸önvramrc½Å±¾ÉèÖÃscsi-initiator-id
ok nvedit
0: probe-all install-console banner
1: cd /pci@6,4000/scsi@3
2: 6 " scsi-initiator-id" integer-property
3: device-end
4: cd /pci@6,4000/scsi@2,1
5: 6 " scsi-initiator-id" integer-property
6: device-end
7: banner (Control C)
ok nvstore
ok setenv use-nvramrc? True
ok setenv auto-boot? true
ok reset-all
ok boot
4£® ÔÚÁ½¸ö½Úµã»úÉÏ°²×°²Ù×÷ϵͳsolaris£¨ÖÁÉÙÑ¡ÓÃ×îÖÕÓû§Ä£Ê½°²×°£©£¬´òÉÏÍƼö²¹¶¡¡£
/: ×îС100M
swap:×îС750M,ÊÇÄÚ´æµÄ2±¶
/globaldevices:100M
ÆðÂë±£ÁôÒ»¸ö100MµÄδÓ÷ÖÇø¹©¾í¹ÜÀíÈí¼þ´æ´¢¾íÐÅϢʹÓá£
5£® È·ÈÏlocal-mac-addressֵΪfalse
#eeprom |grep mac
Èý¡¢ Sun ClusterÈí¼þ°²×°£º
1£®ÔÚÿ¸ö½Úµã»úÉϱ༭/.profileÎļþ
PATH=$PATH:/usr/cluster/bin
MANPATH=$MANPATH:/usr/cluster/man:/usr/share/man
Export PATH MANPATH
2£®ÔÚÿ¸ö½Úµã»úÉϱ༭.rhosts
+
3£®ÔÚÿ¸ö½Úµã»úÉϱ༭/etc/default/loginÎļþ
#CONSOLE=/dev/console
4£®ÔÚÿ¸ö½Úµã»úÉϱ༭/etc/hostsÎļþ£¬½«¶Ô·½½Úµã£¬Âß¼­Ö÷»úÃûµÄ¶ÔÓ¦ipдÈë
5£®½¨Á¢Ò»¸öȫеÄcluster½Úµã
a. ÔËÐÐSunCluster_3.0/Tools/scinstall
b. Establish a new cluster
c. ÊäÈ뼯ȺÃû×Ö
d. ÊäÈ뼯ȺÖÐÁíһ̨½ÚµãµÄ»úÆ÷Ãû
e. ²»Ê¹ÓÃDESÈÏÖ¤
f. ʹÓÃĬÈϵļ¯Èº´«Êä˽ÍøµØÖ·
g. ½ÓÊÜĬÈϵÄÈ«¾ÖÉ豸Îļþϵͳ
h. ½ÓÊÜ×°Íêºó×Ô¶¯ÖØÆð
6£®Ïò¼¯ÈºÖÐÌí¼ÓÁíÒ»¸ö½Úµã
a£® ÔËÐÐSunCluster_3.0/Tools/scinstall
b£® Add this machine as a node in an established cluster
c£® ÊäÈëÖ÷½ÚµãµÄ»úÆ÷Ãû
d£® ½ÓÊÜĬÈϵÄÈ«¾ÖÉ豸Îļþϵͳ
e£® ½ÓÊÜ×°Íêºó×Ô¶¯ÖØÆð
7. ´òÉÏclusterµÄ²¹¶¡
8£®ÅäÖÃQuorum É豸
a. ÔËÐÐscdidadm -LÑ¡Ôñ×¼±¸×÷ΪQuorum diskµÄ´ÅÅ̺ţ¬¸Ã´ÅÅ̱ØÐëÔÚÁ½¸ö½Úµã¶¼ÄÜ·ÃÎʵĹ²Ïí´ÅÅÌ
b. ÔËÐÐscsetup,ÊäÈëÇ°ÃæÑ¡¶¨µÄDIDÉ豸ºÅ
c. ÔÚÁ½¸ö½ÚµãµÄ¼¯ÈºÖв»ÐèÔÙÌí¼ÓQuorum É豸
d. ½ÓÊÜ°²×°
9£®ÅäÖÃÍøÂçʱÖÓͬ²½Ð­Òé
peer clusternode3-priv
peer clusternode4-priv
peer clusternode5-priv
peer clusternode6-priv
peer clusternode7-priv
peer clusternode8-priv
´Ëʱ£¬ÔËÐÐscstat -q,¿ÉÒÔ¿´µ½Ò»¹²ÓÐ3Ʊ£»ÔËÐÐscdidadm -L£¬¿ÉÒÔ¿´µ½ËùÓеÄDIDÉ豸£»ÔËÐÐscconf -p£¬¿ÉÒÔ¿´µ½¼¯Èº×´Ì¬¡¢½ÚµãÃû¡¢Íø¿¨ÅäÖá¢quorumÉ豸״̬¡£ÔËÐÐscshutdown -y -g 15,ÒÔºó¹ØµÄ»úÆ÷ÏÈÆôΪԭÔò²âÊÔclusterʱºòÄÜÕý³£Æô¶¯¡£
¿ÉÒÔÔËÐÐscheck¼ì²écluster°²×°ÊÇ·ñÓдí
ËÄ¡¢ ¾í¹ÜÀí£º
1£®Ê¹ÓÃveritas×÷Ϊ¾í¹ÜÀíÈí¼þ
a£®Í£Ö¹veritas volume manager dynamic multipathing¹¦ÄÜ£¬·ÀÖ¹ËüºÍcluster¹¦ÄܳåÍ»
#mkdir /dev/vx
#ln -s /dev/dsk /dev/vx/dmp
#ln -s /dev/rdsk /dev/vx/rdmp
b£®°²×°veritas volume manager Èí¼þ£¬²¢´òÉÏveritasµÄ²¹¶¡
pkgadd -d . VRTSvmdev VRTSvmman VRTSvxvm
c£®ÐÞ¸ÄÁ½Ì¨½Úµã»úµÄvxioºÅΪһÖ£¬²¢²»ÓëÆäËûÉ豸³åÍ»¡£ÐÞ¸Äʱ±ØÐë°ÑclusterÈí¼þÍ£Ö¹
#grep vxio /etc/name_to_major
d£®·â×°rootdg
#vxconfigd -m disable
#vxdctl init
#vxdg init rootdg
#vxdctl add disk c0t0d0sX(δÓ÷ÖÇø) type=simple
#vxdisk -f init c0t0d0sX type=simple
#vxdg adddisk c0t0d0sX
#vxdctl enable
#rm /etc/vx/reconfig.d/state.d/install-db(¸ÃÎļþ²»É¾³ý£¬ÏµÍ³²»»áÆô¶¯vmÈí¼þ)
ÄãÒ²¿ÉÒÔʹÓÃ/usr/sbin/vxinstall¶ÔÕû¸öϵͳÅ̽øÐзâ×°£¬ÐγÉrootdg,µ«Äã±ØÐëÊÂÏȱ£ÁôÁ½¸öδÓ÷ÖÇø£¬Ò»°ãΪslice 3ºÍslice 4¡£
e. ÖØÆð½Úµã1£¬¿´vmÊÇ·ñÕý³£Æô¶¯
VxVM starting in boot mode¡­
VxVM general startup¡­
¿ÉÒÔʹÓÃvxprint²ì¿´ÒÑÅädisk group×´¿ö
f£®ÔÚÁíһ̨½Úµã»úÉÏ°²ÒÔÉϲ½Öè°²×°veritasÈí¼þ²¢ÅäÖÃrootdg,ÖØÆð¡£
g. ÔÚн¨µÄdgÉϽ¨Á¢¾í
#vxassist -g xxx make volname 200m layout=mirror
e. ×¢²ádisk grups
#scconf -a -D type=vxvm ,name=xxxx,nodelist=node1:node2
Èç¹ûÔÙÒÑ×¢²áµÄdgÉÏÌí¼Óvol,ÐèÔËÐÐscsetupͬ²½×¢²áÐÅÏ¢¡£
f. ʹÓÃÒѽ¨vol
#newfs /dev/vx/rdsk/dg-name/volname
#mkdir /global/xxx(Á½½Úµãͬʱ×ö)
#vi /etv/vfstab£¨Á½½Úµãͬʱ×ö£©
/dev/vx/dsk/dgname/volname /dev/vx/rdsk/dgname/bolname /global/xxx ufs 2 yes global,logging
#mount /global/xxx
Îå¡¢ ×ÊÔ´ÅäÖãº
1. ÅäÖÃnafo
#pnmset
ÊäÈënafo×éºÅ¼°¸Ä×é°üº¬µÄÍø¿¨Ãû³Æ
2£®ÅäÖÃ×ÊÔ´×é
1). Sun Cluster3.0Ö§³ÖÁ½ÖÖ×ÊÔ´ÀàÐÍ£º
a.Êý¾Ý×ÊÔ´ÀàÐÍ£¨Data service resource£©£º
oracle¡¢iplanet¡¢netscape¡¢apache¡¢dns¡¢nfs
b.Ԥע²á×ÊÔ´ÀàÐÍ(Preregistered Resource )£º
SUNW.HAStorage¡¢SUNW.LogicalHostname(¹©failoverÊý¾Ý×ÊԴʹÓÃ)¡¢
SUNW.SharedAddress£¨¹©scalableÊý¾Ý×ÊԴʹÓã©
2). ÅäÖÃfailover Êý¾Ý×ÊÔ´£¬ÒÔSun Cluster HA for NFSΪÀý£º
a. Ìí¼ÓNFSÊý¾Ý×ÊÔ´°ü£¨Á½¸ö½Úµã»ú£©£¬¿ÉÓÃpkgaddÃüÁҲ¿ÉÓÃscinstall½»»¥½çÃæ
b. ½¨Á¢NFSĿ¼
#mkdir -p /global/nfs/admin/SUNW.nfs
#mkdir -p /global/nfs/data
#chmod 777 /global/nfs/data
c. ±à¼­NFS²ÎÊýÎļþ
# vi /global/nfs/admin/SUNW.nfs
share -F nfs -o -rw -d¡±Home Dirs¡± /global/nfs/data
d. ×¢²áÊý¾Ý×ÊÔ´(×ÊÔ´±ØÐë×¢²áºó²ÅÄÜʹÓÃ)
#scrgadm -a -t SUNW.nfs
#scrgadm -a -t SUNW.HAStorage
e. ½¨Á¢failover×ÊÔ´×é
#scrgadm -a -g nfs-rg -h node1,node2 -y Pathprefix=/global/nfs/admin
f. Íù×ÊÔ´×éÖÐÌí¼Ó×ÊÔ´
#scrgadm -a -L -g nfs-rg -l clustername-nfs (×¢£ºclustername-nfsÔÚÁ½Ì¨½Úµã»úµÄ/etc/hostsÖÐÓÐÏàÓ¦¼Ç¼)
#scrgadm -a -j has-res -g nfs-rg -t SUNW.Hastorage -x ServicePaths=/global/nfs -x AffinityOn=True (AffinityOn=True: Ó¦ÓÃÇл»£¬´ÅÅÌ´æÖüÒ²¸úËæÇл»)
#scrgadm -a -j nfs-res -g nfs-rg -t SUNW.nfs -y Resource_dependencies=has-res
g. ³õʼ»¯×ÊÔ´×飬ÊÇÖ®ÉúЧ
#scswitch -Z -g nfs-rg
h. ¼ì²âcluster״̬
#scstat -g
#scswitch -z -h dest-node -g nfs-rg
3) ÅäÖÃscalableÊý¾Ý×ÊÔ´×飬ÒÔSun Cluster Scalable Service for ApacheΪÀý
a. Ìí¼ÓApacheÊý¾Ý×ÊÔ´°ü£¨Á½¸ö½Úµã»ú£©£¬¿ÉÓÃpkgaddÃüÁҲ¿ÉÓÃscinstall½»»¥½çÃæ
b. ¹Ø±Õapache×Ô¶¯Æô¶¯ºÍ¹Ø±Õ¹¦ÄÜ
#mv /etc/rc0.d/K16apache /etc/rc0.d/k16apache
#mv /etc/rc1.d/K16apache /etc/rc1.d/k16apache
#mv /etc/rc2.d/ K16apache /etc/rc2.d/k16apache
#mv /etc/rc3.d/S16apache /etc/rc3.d/s16apache
#mv /etc/rcS.d/ K16apache /etc/rcs.d/k16apache
c. ÔÚÁ½¸ö½Úµã»úµÄ/etc/hostsÖÖ¶¼¼ÓÈëclustername-webµÄÏàÓ¦ÄÚÈÝ
clustername-web IP_address
d. ±à¼­¿ØÖÆÎļþ£¬½¨Á¢ÏàÓ¦µÄ·þÎñĿ¼
Server Name clustername-web (È¥µôÔ­ÓеÄ×¢ÊÍ)
DocumentRoot ¡°/global/web/htdocs¡±
;
scriptAlias /cgi-bin/ ¡°/global/web/cgi-bin¡±
;
e. ½¨Á¢htmlºÍcgiĿ¼Îļþ
#mkdir /global/web/htdocs
#mkdir /global/web/cgi-bin
#cp -rp /var/apache/htdocs /global/web
#cp -rp /var/apache/cgi-bin /global/web
f. ×¢²áÊý¾Ý×ÊÔ´(×ÊÔ´±ØÐë×¢²áºó²ÅÄÜʹÓÃ)
#scrgadm -a -t SUNW.apache
g. ½¨Á¢×ÊÔ´×é
#scrgadm -a -g sa-rg -h node1,node2
h. Íù×ÊÔ´×éÀïÌí¼Ósclable×ÊÔ´
#scrgadm -a -S -g sa-rg -l clustername-web
#scrgadm -a -g web-rg -y Maximum_primaries=2 -y Desired_primaries=2 -y RG_dependencies=sa-rg
#scrgadm -a -j apache-res -g web-rg -t SUNW.apache -x \
Confdir_list=/etc/apache -x Bin_dir=/usr/apache/bin \
-y Scalable=TRUE -y Network_resources_used=clustername-web
i. ³õʼ»¯×ÊÔ´×飬ÊÇÖ®ÉúЧ
#scswitch -Z -g sa-rg
#scswitch -Z -g web-rg
j. ¼ì²âcluster״̬
#scstat -g
k. µ÷Õû½Úµã¸ºÔØ£¬Ä¬ÈÏΪ1£º1
#scrgadm -c -j web-res -y Load_balance_weights=5@node1,2@node2
Áù¡¢ Sun ClusterµÄÈÕ³£Î¬»¤ºÍ¹ÜÀí£º
1. ÏÔʾsun cluster ·¢Ðа汾
#scinstall -pv
2. ÏÔʾÒÑÅäÖõÄ×ÊÔ´ÀàÐÍ¡¢×ÊÔ´×éºÍ×ÊÔ´
#scrgadm -p
3. ¼ì²é¼¯Èº×é¼þ״̬¼°ÅäÖÃ
#scstat -p
#scconf -p
#scrgadm -pv(v)
4. ¹Ø±Õ¼¯Èº
#scshutdown -g 0 -y
´ËÃüÁÿ¸ö½Úµã¶¼¹Ø±Õµ½OK״̬£¬¿ÉÓÃbootÃüÁîÆô¶¯£¬È»ºóÓÃscstat -n״̬¼þÔò½Úµã״̬¡£
5£®¹Ø±Õµ¥¸ö½Úµã
#scswitch -s -h node2
#shutdown -g 0 -y
6£®½«Ä³Ò»½ÚµãÖÃΪά»¤×´Ì¬
#scconf -c -q globaldev=quorumdivice(dx),maintstate
7. ÊÖ¹¤Ð޸ĽڵãquoroumµÄͶƱÊý
a. ok>; boot -x
b. #cd /etc/cluster/ccr
c. #vi infrastructure
cluster.nodes.1.name torrey
cluster.nodes.1.properties.quorum_vote 3
d. #cd /etc/cluster/ccr
e. #/usr/cluster/lib/sc/ccradm -I /etc/cluster/ccr/infrastructure -o
f. #reboot
8. ɾ×ÊÔ´×éºÍdisk group
a. Í£×ÊÔ´£ºscswitch -n -j resourcename
b. ɾ×ÊÔ´£ºscrgadm -r -j resourcename
c. ɾ×ÊÔ´×飺scrgadm -r -g resourcegroup
d. ɾdg£ºvxdg destroy dgname
9. ɾ³ý clusterÈí¼þ
g. ok>;boot -x
h. #pkgrm clusterpkgname
i. rm -r /var/cluster /usr/cluster /etc/cluster
j. vi /etc/vfstab,½«Ô­À´ËùÓеÄdis²ÎÊý»Ö¸´£¬Öؽ¨/global/devices
m. rm -r /dev/did
n. rm -f /devices/pseudo/did*
o. rm /etc/path_to_inst
p. reboot -- -ra

Æß¡¢ Sun cluster 3.0Óë2.2µÄ±È½Ï
Sun cluster 3.0
Ö§³Ö8¸ö½Úµã
Ö§³Öufs,hsfs,ΪʵÏÖscalable³öÏÖÁËglobal¸ÅÄî
cluster networking share address
Ö§³Öscalable,failoverģʽ
ÓÚϵͳºËÐİ󶨺ܽô£¬Ö»ÓÐnetworkºÍresource groupÓÉÏà¹ØdemondÆô¶¯¹ÜÀí
ʹÓÃboot -x¿ÉÒÔÖ»Æðϵͳ£¬²»Æðcluster
Ö§³Ösolaris 8
Ö§³ÖǧÕ×Íø¿¨£¬²»Ö§³Ösci card
ÒÔ×ÊÔ´×éΪÇл»µ¥Î»£¬×ÊÔ´ÀàÐÍÓÐapp,ip,data
sun cluster2.2
Ö§³Ö4¸ö½Úµã
Ö§³Öufs,ûÓÐglobal
logical host address
Ö»Ö§³Öfailoverģʽ
ÓÚϵͳºËÐİ󶨲»½ô£¬¿ÉÒÔÏÈÆðϵͳÔÙÊÖ¹¤Æðcluster
Ö§³Ösci card(100M byte/s)
ÒÔÂß¼­»úΪÇл»µ¥Î»
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ