Whole Server Migration

WSM is the process of moving the entire server instance from one physical machine to another upon failure or scheduled maintenance. All the services being hosted by that particular instance will also be migrated along with it to another healthy server.

Machine configuration for WSM

1. Identify two machines on the same sub net for running Server Migration.

2. Create a local directory for the user. Ensure same directory structure on both the machines.

3. User need to have access to some shared disk between these two boxes (e.g. NFS).

4. Obtain Floating IP addresses that can be shared between the two machines.

5. Establish trust between Machines (SSH/RSH). SSH version should be of same version and needs to be available on both the boxes. Use following commands for that –

cd .ssh

ssh -keygen -t rsa

cat id_rsa.pub >> authorized_keys

Copy authorized_keys dir to .ssh directory of another machine.

6. Get Super-User privileges to add/remove floating IPs.

7. Note the interface name and Netmask of each machine

8. Install WebLogic server on both the machines in the user local home directory.

9. Modify wlscontrol.sh under WL_HOME/common/bin directory to add interface and NetMask.

10. Change Interface=${WLS_Interface:-“”} to Interface=en0
and NetMask=$WLS_NetMask:-“”} to NetMask=255.255.255.0

11. Modify wlsifconfig.sh to hard code value of Sudo. For e.g. SUDO=/usr/bin/sudo

12. Copy wlscontrol.sh and wlsifconfig.sh to /usr/bin (these two files need to be in system path and /usr/bin is always in system path).

Configuring Whole Server Migration

1. Creating clustered domain

Create a multi machine clustered domain with following configuration:

1. Admin server

2. Two managed servers (here ms1 and ms2) with floating IP addresses assigned to them.

3. A cluster with managed servers assigned to it.

4. Two machines (machine1 and machine2). Assign IP address of one of the machines (physical machine) to Node manager listen address of machine1 and IP address of other machine as Node manager listen address of machine2.

5. Assign Admin server and managed server1 to machine1 and managed server2 to machine2.

2. Packing and unpacking of domain

Now pack this domain and unpack it under same directory structure in second machine.

Execute Following command under $WL_HOME/common/bin dir to pack this domain.

pack.sh –managed=true –domain=<domain name> -template=<domain_name.jar> -template_name=”<description>”

 Now copy the jar file under some location in another machine where we have to unpack it. For unpacking execute following command under $WL_HOME/common/bin

unpack.sh –domain=<domain name> -template=<jar file name>

For more details on packing and unpacking of domain, please click here

3. Configuring Automatic Migration

After you are done with creating domain, and packing/unpacking of domain, run admin server as well as node managers in both machines. Open admin console and configure for automatic server migration. The steps are as follows:

  • Configure Migration Leasing Basis – Configure migration leasing basis as database or consensus (in-memory) for cluster. Under Domain structure in admin console, go to Environment -> Clusters and click on cluster name. You’ll get screen as shown below. Go to Migration tab under Configuration. Select Migration basis as consensus or database. Under Candidate Machines for Migratable Servers select and move machines from available to chosen. These are the machines and order of preference on which Node Manager will restart failed servers.

Migration basis

  • Configure Managed Servers for Automatic Migration
    Go to Environment -> Servers, you’ll see summary of severs. Click on managed server you want to configure for migration (here ms2).

Manageg servers

.

In the following screen. Go to Migration tab and select Automatic Server Migration Enabled. Also move the machines from Available to Chosen under Candidate Machines.

Candidate machines

.

Now restart the admin server and managed servers in both machines.

After the servers are restarted, you’ll see ms1 and admin server running in unix1 and ms2 running in unix2.

To verify if the configuration, go to unix2 machine and kill ms2 as well as nodemanager running in that machine. Killing nodemanager is necessary because if it is not killed, it will try to restart the server in same machine that is unix2 instead of migrating it to another machine. Once the nodemanager and ms2 are killed in unix2 machine, go to unix1 machine and check the running processes. You’ll see ms2 process starting in unix1 machine.

4. Manually Migrating Server Instance

For manual migration, go to Environment -> servers and click on the server instance you want to migrate. For e.g. ms2. Go to Control tab and under that go to Migration tab. Under “Migrate to Machines”, select the machine on which you want to migrate the selected server instance (unix1 in this case). Now you can go to that particular machine and check the processes running (ps -aef) in that machine. In this case you’ll see ms2 also running in unix1.

Migrate

About the Author Masroof Ahmad

Leave a Comment:

6 comments
Add Your Reply