Program guide > (deprecated) Partitioning facility > Manage the partitioning facility environment > Management script wpfadmin and usage


Deprecated feature: The partitioning facility (WPF) feature is deprecated. You can configure partitioning with WebSphere eXtreme Scale.


createPolicy

The createPolicy parameter is used to create a policy.

The following scenario is an example of incorporating policies to manage partitions. The wpfadmin parameter, createPolicy, is used to create four policies. The cluster has four servers that host partitions on four different nodes:

Each node has a backup server in case the hosting server goes down. These servers are:

An application is installed that creates 40 partitions at startup. The partitions belong to four different classifications:

To achieve this activation request, four policies are created:

From the application server bin directory, issue the command:

./wpfadmin createPolicy /Policy1.properties

The Policy1.properties file contains the following.

CoreGroupName = DefaultCoreGroup
PolicyType = OneOfNPolicy
PolicyName = Policy1
PolicyDescription = Policy for partitions1-10
IsAlivePeriodSec = 120
QuorumEnabled = false
NumOfMatchCriteria = 2
Name_0 = -gt
Value_0 = -p
Name_1 = -pc
Value_1 = class1
Failback = true
PreferredOnly = true
NodeName_0 = NodeA
ServerName_0 = Server1
NodeName_1 = NodeA
ServerName_1 = BackupServer1

Run ./wpfadmin createPolicy /Policy2.properties with the following information in the Policy2.properties file.

CoreGroupName = DefaultCoreGroup
PolicyType = OneOfNPolicy
PolicyName = Policy2
PolicyDescription = Policy for partitions11-20
IsAlivePeriodSec = 120
QuorumEnabled = false
NumOfMatchCriteria = 2
Name_0 = -gt
Value_0 = -p
Name_1 = -pc
Value_1 = class2
Failback = true
PreferredOnly = true
NodeName_0 = NodeB
ServerName_0 = Server2
NodeName_1 = NodeB
ServerName_1 = BackupServer2

Issue ./wpfadmin createPolicy /Policy3.properties with the following in Policy3.properties.

CoreGroupName = DefaultCoreGroup
PolicyType = OneOfNPolicy
PolicyName = Policy3
PolicyDescription = Policy for partitions21-30
IsAlivePeriodSec = 120
QuorumEnabled = false
NumOfMatchCriteria = 2
Name_0 = -gt
Value_0 = -p
Name_1 = -pc
Value_1 = class3
Failback = true
PreferredOnly = true
NodeName_0 = NodeC
ServerName_0 = Server3
NodeName_1 = NodeC
ServerName_1 = BackupServer3

Run ./wpfadmin createPolicy /Policy4.properties with the following information in the Policy4.properties file.

CoreGroupName = DefaultCoreGroup
PolicyType = OneOfNPolicy
PolicyName = Policy4
PolicyDescription = Policy for partitions31-40
IsAlivePeriodSec = 120
QuorumEnabled = false
NumOfMatchCriteria = 2
Name_0 = -gt
Value_0 = -p
Name_1 = -pc
Value_1 = class4
Failback = true
PreferredOnly = true
NodeName_0 = NodeD
ServerName_0 = Server4
NodeName_1 = NodeD
ServerName_1 = BackupServer4

Notice the match criteria for the four policies. They are set up in name/value pairs.

Now the core group is set up with the four policies. Start the node agents on nodes A-D. After a short interval, the core group changes are synchronized to all the nodes. Assuming that the application is already installed, when Server1 is started partitions1-10 are activated on Server1 because Policy1 has the preferredOnly value set to true Partitions1-10 can only be started on Server1 and BackupServer1. If BackupServer1 is started before Server1, partitions1-10 are activated on BackupServer1. If neither Server1 or BackupServer1 are started, the partitions are not activated.

This situation explains how the preferredOnly and preferred servers work. When the failback option is set to true, the partitions for the policy are always activated on the preferred server. If partitions1-10 are active on Server1, then Server1 goes down, the partitions activate on BackupServer1. If in the future Server1 comes up, the partitions go back to Server1, because this server is first in the preferred server list.

Consider the following server startup scenarios:


Parent topic:

Management script wpfadmin and usage


Related concepts

Management script wpfadmin and usage