modifyappgroup

Use the modifyappgroup command to modify an existing application. You can add and remove members of the application by specifying the member type and the key for the individual member. You can also use a -tagkey and -tagvalue member pair.

Syntax


1  tpctool modifyappgroup  -user  user_name -pwd  password   -url  url  -add  -remove  -id  ApplicationGroupID   -type 
2.1 appgroup
2.1 datastore
2.1 export
2.1 filesystem
2.1 fileset
2.1 server
2.1 vm
2.1 volume
2.1 volumegroup  -key memberKey  OR  -tagkey
2.1 udp1 
2.1 udp2
2.1 udp3  -tagvalue  tagvalue?  -help?  -fs  character?  -qs  character?   -silent?  -header 

Parameters and arguments

-user user_name
Specifies an IBM Spectrum Control™ user ID.
-pwd password
Specifies the password for the IBM Spectrum Control user ID.
-url url
Specifies the Device server. The format of the URL is system:port_number, where system represents either the host name or IP address, and port_number represents the IBM Spectrum Control Device server port.
-add
Adds a member to the specified application, which is designated by the specified member type and key or the -tagkey,-tagvalue parameter pair.
Restriction: Vaults can only be added with the IBM Spectrum® Control GUI.
-remove
Removes a member from the specified application, which is designated by the member type and key that you specify or the -tagkey,-tagvalue parameter pair. Use the lsappgroupmembers -id ApplicationGroupID command to view a list of members and member keys for a specified application.
-id ApplicationGroupID
The identifier of the application that is being modified. Use the lsappgroup command, to view a list of the applications that are known to IBM Spectrum Control.
-type appgroup | datastore | export | filesystem | fileset | server | vm |volume | volumegroup
Denotes the type of element that needs to be added to or removed from the application.
-key memberKey
The unique key that corresponds to the member and member type that is specified by the -type parameter.
You can specify one of the following key types for this parameter:
appgroup
The identifier of the application to be added or removed.
datastore
The ID of the data store, which is composed of the data store name and the hypervisor host name.

To find the hypervisor server key for the data store, use the lssvr command, and the lsfs command, with the -svr hypervisor_server_key option, to obtain the ID of the data store. For example, C:\TPC_install_directory\cli>tpctool lssvr -l and C:\installation_dir\cli>tpctool lsfs -svr key_from_the_first output.

The following example shows how to add a data store to an application:
C:\installation_dir\cli>tpctool modifyappgroup -add -id 
ApplicationGroupID -type datastore -key ID_from_lsfs_output
export
The ID of the export, which is composed of the export name, cluster name, storage system name, and storage system format for IBM® Storwize® V7000 Unified and IBM Spectrum Scale. For servers and NetApp file servers, this parameter is composed of the export name and host name of the servers and NetApp file servers.

To find the ID for the export, use the lssvr command to locate the server key for servers and NetApp file servers, or use the lsdev command to get a share and the subsystem ID.

For example: C:\installation_dir\cli>tpctool lssvr -l and C:\installation_dir\cli>tpctool lsdev -subsys -l.

To find the cluster, run the following command:
C:\installation_dir\cli>tpctool lscluster -dev 
GUID_of_the_subsystem -l

The following example shows how to find the exports:

C:\installation_dir\cli>tpctool lsexport -svr server_key or C:\installation_dir\cli>tpctool lsexport -cluster ID_of_the_cluster

The following example shows how to add an export to an application:
C:\installation_dir\cli>tpctool modifyappgroup -add -id 
ApplicationGroupID -type export -key id_from_lsexport_output
Note: AIX® and Linux® exports are only available if the user of the computer explicitly exports the directories.
filesystem
The ID of the file system, which is composed of the file system name and host name of the server.

The ID of the file system is listed in the ID column of the lsfs command output.

To find the server key for the file system, use the lssvr command, and the lsfs command, with the -svr server_key option.

For example:

C:\installation_dir\cli>tpctool lssvr -l and C:\installation_dir\cli>tpctool lsfs -svr key_from_the_first_output

The following example shows how to add a file system to an application :
C:\installation_dir\cli>tpctool modifyappgroup -add -id 
ApplicationGroupID -type filesystem -key id_from_lsfs_command_output
fileset
The unique ID of the fileset, which is composed of the file system name, cluster name, storage system name, and storage system format for IBM Storwize V7000 Unified and IBM Spectrum Scale.

The unique ID of the fileset is listed in the File Set column of the lsfset command output.

The following example shows how to add a fileset to an application:
C:\installation_dir\cli>tpctool modifyappgroup -add -id 
ApplicationGroupID -type fileset -key id_from_lsfset_command_output
The following example shows how to remove a fileset from an application:
C:\installation_dir\cli>tpctool modifyappgroup -remove -id 
ApplicationGroupID -type fileset -key id_from_lsfset_command_output
server
The combination of the GUID, the host name, and the IP address. The unique key for the server is listed in the Key column of the lssvr -l command output.
The following example shows how to retrieve the ID for the server:
C:\installation_dir\cli>tpctool lssvr -l
The following example shows how to add a server to an application:
C:\installation_dir\cli>tpctool modifyappgroup -add -id 
ApplicationGroupID -type server -key id_from_lssvr_output
vm
The ID of the virtual machine, which is composed of the virtual machine and the host name of the hypervisor. The ID of the virtual machine is listed in the Key column of the lsvm command output.
The following example shows how to obtain the ID for the virtual machine:
C:\installation_dir\cli>tpctool lsvm
The following example shows how to add a virtual machine to an application:
C:\installation_dir\cli>tpctool modifyappgroup -add -id 
ApplicationGroupID -type vm -key id_from_lsvm_output
volume
The ID of the storage volume, which is composed of the storage volume name, storage system name, and storage system format. The ID of the storage volume is listed in the ID column of the lsvol command output.
The following example shows how to find the ID of the volume:
C:\installation_dir\cli>tpctool lsvol -dev 
GUID_of_the_subsystem -l 
The following example shows how to obtain the key for the subsystem of the volume:
C:\installation_dir\cli>tpctool lsdev -subsys -l
The following example shows how to add the ID of the volume to an application:
C:\installation_dir\cli>tpctool modifyappgroup -add -id 
ApplicationGroupID -type volume -key volume_id
volumegroup
The ID of the volume group, which is composed of the volume group name and the host name. The ID of the volume group is listed in the Key column of the lsvolgroup command output.
The following example shows how to obtain the ID for the server:
C:\installation_dir\cli>tpctool lssvr -l
The following example shows how to find the ID of the volume group:
C:\installation_dir\cli>tpctool lsvolgroup -svr
server_ID_from_lssvr_output -l 
The following example shows how to add the ID of the volume group to an application:
C:\installation_dir\cli>tpctool modifyappgroup -add -id 
ApplicationGroupID -type volumegroup -key volumegroup_id
-tagkey udp1 or udp2 or udp3
Specifies the -tagkey parameter that is used to create application members.
Only the following -type parameters can be defined with tags:
  • server
  • filesystem
  • appgroup
-tagvalue tagvalue
Specifies the -tagvalue parameter that is used to create application members.
Note: You can only specify one -tagkey and-tagvalue parameter member pair at a time.
-fs character
Specifies the 7-bit character that separates the information in the output. If you omit this parameter, the information is separated by blank spaces.
-header
Suppresses the column headings in the output. If you omit this parameter, the column headings are included.
-help | -h | -?
Lists help information for the command.
-qs character
Specifies the 7-bit character that surrounds character strings and date stamps in the output. If you omit this parameter, character strings and date stamps are enclosed by double quotation marks (").
-silent
Suppresses all output for the command. If you omit this parameter, output is included.

Example: Adding members to an application

The following example adds the application member that is specified by the -type and -key parameters, to /Application/5055.

You can add members to a specified application, with the following command:
tpctool
tpctool> modifyappgroup -add -id /Application/5044 -type appgroup
    -key /Application/5055

The following output is returned:

Group Name    Member Key         Member Type           Status
==================================================================
DB2appgroup /Application/5055 	Application Group 	    SUCCESS

Example: Removing members of an application

The following example removes the application member that is specified by the -type and -key parameters, from application -id /Application/5055 .

You can remove members of a specified application with the following command:
tpctool
tpctool> modifyappgroup -remove -id /Application/5044 -type appgroup
    -key /Application/5055

The following output is returned:

Group Name    Member Key         Member Type       Status
===========================================================
DB2appgroup  /Application/5055   Application Group SUCCESS

Example: Adding application members with tags

The following example adds servers that are specified by the -tagkey and -tagvalue parameters to the application with -id /Application/5044.

You can add members to a specified application with tags using the following command:
tpctool
tpctool>  modifyappgroup -id /Application/5044 -add -type server -tagkey
 udp1 -tagvalue "dbservers"

The following output is returned:

Group Name     Member Key                                  Member Type Status
===============================================================================
DB2appgroup    bea358-ui.storage.abc.ibm.com+192.0.2.51+++ Server      SUCCESS
DB2appgroup    228e76-ui.storage.abc.ibm.com+192.0.2.76+++ Server      SUCCESS