This discussion is archived
3 Replies Latest reply: Mar 23, 2010 12:50 PM by 3004 RSS

Failover server setup

807750 Newbie
Currently Being Moderated
Hi all,
I am trying to find out on how to setup a fail over server of Sun MC4. If anyone is aware of a document to achieve this configuration please do let me know. Also, I want to make sure that the database stays intact in the situation if I have to use another server for monitoring purposes.

Thanks for all the help.
  • 1. Re: Failover server setup
    796313 Newbie
    Currently Being Moderated
    Hi Zeealee,
    zeealee wrote:
    Hi all,
    I am trying to find out on how to setup a fail over server of Sun MC4. If anyone is aware of a document to achieve this configuration please do let me know. Also, I want to make sure that the database stays intact in the situation if I have to use another server for monitoring purposes.
    I have heard of customers using Sun Cluster and Veritas Cluster for this, but the only online docs I've seen just [recommend using Sun Cluster to configure whole-root-zone failover|http://docs.sun.com/app/docs/doc/820-2215/gbwhv?l=en] (and put your SunMC Server in that zone). That works for active/passive setups, when the two Server systems are close enough together to share storage. In that case you don't have to worry about keeping 2 databases in sync, as you're only ever running one.

    For active/active setups (i.e to balance Agent load) or to use two Servers in differnent datacenters you can also use [Halcyon HA for SunMC|http://www.halcyoninc.com/products/HighAvailability/index.php], You can read about the differences here.

    Regards,

    Mike.Kirk@HalcyonInc.com
  • 2. Re: Failover server setup
    3004 Newbie
    Currently Being Moderated
    I have it semi-automated in Sun Cluster 3.2:


    1) Use a logical hostname to configure SMC 4.0 server.
    2) Use a failover ZFS pool as a HASP resource
    3) Set up a SMC resource group that is dependent on the Logical Hostname resource and HASP resource
    4) configure the group to be managed but not monitored, so you can manually start up and shutdown the rg (at least until we can get step 5 working)

    I can thus failover and manually startup/shutdown

    5) Set up a GDS resource that controls startup/shutdown of SMC (I've been having some trouble with this part..will update when I get time to work on it)
    The roadblock there in is that the startup script needs to be a continuously running process (es-start simply exits after starting the "esd" processes)...otherwise the rg will ping-pong and finally time out/shutdown. The workaround is to write a custom data service/agent to do the startup/shutdown (which I haven't had the time to write yet).
    If someone has, do share.
  • 3. Re: Failover server setup
    3004 Newbie
    Currently Being Moderated
    Okay...I finally did it:


    Create a file called smc.rtr
    vi smc.rtr
    "smc.rtr" [New file] 
    # Sun Cluster Data Services Builder template version 1.0
    # Registration information and resources for smpl
    #
    #NOTE: Keywords are case insensitive, i.e., you can use
    #any capitalization style you prefer.
    #
    Resource_type = "smc";
    Vendor_id =SUNW;
    RT_description = "Sun Management Server Service on Sun Cluster";
    
    RT_version ="1.0"; 
    API_version = 2;
    Failover = TRUE;
    
    Init_nodes = RG_PRIMARIES;
    
    RT_basedir=/opt/SUNWsymon/sbin;
    
    Start           =   /opt/smc/SUNWsymon/bin/smcstart.sh;
    Stop            =   /opt/smc/SUNWsymon/bin/smcstop.sh;
    create files smcstart.sh and smcstop.sh
     # cat /opt/smc/SUNWsymon/bin/smcstart.sh
    #!/usr/bin/ksh
    
    BINDIR=/opt/smc/SUNWsymon/sbin
    $BINDIR/es-start -A
    and
    # cat /opt/smc/SUNWsymon/bin/smcstop.sh    
    #!/usr/bin/ksh
    
    BINDIR=/opt/smc/SUNWsymon/sbin
    $BINDIR/es-stop -A
    copy the smc.rtr file to appropriate directory (the failover HASP resource or filesystem that is being controlled by the cluster):
    #cp smc.rtr /opt/smc/SUNWsymon
    Now run following cmd to register the resourcetype/custom data service/agent:
    scrgadm -at smc -f /opt/smc/SUNWsymon/smc.rtr
    and then create the smc resource:
    clrs create -g scha_smc_rg -t smc scha_smc_rs
    If your app is already running at this point, it will fault with "start failed" (it did in my case as it was already running)

    in that case, disable the resource:
     # clrs disable scha_smc_rs
    and then enable the resource:
     # clrs enable scha_smc_rs
    Verify that the services have started:
     # svcs -a|grep sunmc
    disabled       Jan_06   svc:/application/management/sunmcplatform:default
    online         14:44:36 svc:/application/management/sunmcwebserver:default
    online         14:44:47 svc:/application/management/sunmcdatabase:default
    online         14:44:52 svc:/application/management/sunmcjavaserver:default
    online         14:44:59 svc:/application/management/sunmctrap:default
    online         14:45:01 svc:/application/management/sunmccfgserver:default
    online         14:45:03 svc:/application/management/sunmcevent:default
    online         14:45:09 svc:/application/management/sunmcagent:default
    online         14:45:13 svc:/application/management/sunmctopology:default
    online         14:45:50 svc:/application/management/sunmcmetadata:default
    online         14:45:54 svc:/application/management/sunmcgrouping:default
    Test failover by running:
    # clrg switch -n hostb scha_smc_rg