Installing a 13.5 Management Agent Using the agentDeploy Script

We can install a Management Agent using the agentDeploy.sh script in the following ways:

Using EM CLI from the remote Destination Host

Acquiring the Management Agent Software and Downloading it onto the destination Host Using EM CLI.

Download and Set up EM CLI on the destination host.

The rest steps will be same as the followings, so we don’t repeat again.

Using EM CLI from the OMS Host

Acquiring the Management Agent Software and Downloading it onto the OMS Host Using EM CLI.

On OMS server host:

$ emcli login -username=sysman
Enter password :

Login successful

$ emcli sync
Synchronized successfully

$ emcli get_supported_platforms
-----------------------------------------------
Version = 13.5.0.0.0
 Platform = Linux x86-64
-----------------------------------------------
Platforms list displayed successfully.

Download the Management Agent software from the Software Library to a temporary directory on the OMS host:

$ emcli get_agentimage -destination=/tmp/agentimage  -platform="Linux x86-64" -version=13.5.0.0.0
=== Partition Detail ===
Space free : 7 GB
Space required : 1 GB
Check the logs at /u01/app/oracle/product/13.5.0/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2024-09-30_20-25-31-PM.log
Downloading /tmp/agentimage/13.5.0.0.0_AgentCore_226.zip
File saved as /tmp/agentimage/13.5.0.0.0_AgentCore_226.zip
Downloading /tmp/agentimage/13.5.0.0.0_Plugins_226.zip
File saved as /tmp/agentimage/13.5.0.0.0_Plugins_226.zip
Downloading /tmp/agentimage/unzip
File saved as /tmp/agentimage/unzip
Executing command: /tmp/agentimage/unzip /tmp/agentimage/13.5.0.0.0_Plugins_226.zip -d /tmp/agentimage
Archieving agentImage and plugins.
Exit status is:0
Agent Image Download completed successfully.

$ ls -ltr /tmp/agentimage/
total 774044
-rw-r--r--. 1 oracle oinstall 792618975 Sep 30 20:25 13.5.0.0.0_AgentCore_226.zip

Transferring the Management Agent Software to the Destination Host /tmp directory.

Unzip the agent image into a temp directory:

$ unzip /tmp/13.5.0.0.0_AgentCore_226.zip -d agentimage/

Archive: 13.5.0.0.0_AgentCore_226.zip
inflating: agentimage/agentcore.bin
inflating: agentimage/agent.rsp
inflating: agentimage/agentDeploy.sh
inflating: agentimage/agentimage.properties
inflating: agentimage/unzip
inflating: agentimage/zip
creating: agentimage/plugins/
inflating: agentimage/plugins/oracle.sysman.emas.discovery.plugin-13.5.1.0.0.farb
inflating: agentimage/plugins/oracle.sysman.si.discovery.plugin-13.5.1.0.0.farb
inflating: agentimage/plugins/oracle.fmw.gg.discovery.plugin-13.5.2.0.0.farb
inflating: agentimage/plugins/oracle.sysman.db.discovery.plugin-13.5.1.0.0.farb
inflating: agentimage/plugins/oracle.sysman.xa.discovery.plugin-13.5.1.0.0.farb
inflating: agentimage/plugins/oracle.sysman.oh.discovery.plugin-13.5.0.0.0.farb
inflating: agentimage/plugins/oracle.sysman.oh.agent.plugin-13.5.0.0.0.farb
inflating: agentimage/plugins.txt
creating: agentimage/oneoffs/
inflating: agentimage/oneoffs/agentDeploy.sh
inflating: agentimage/oneoffs/agentConfig.jar
inflating: agentimage/oneoffs/agentInstaller.jar
inflating: agentimage/oneoffs/applypatchesonapplicablehome.pl
inflating: agentimage/oneoffs/opatch_common.pl

Edit agent.rsp

$ cat agentimage/agent.rsp | grep -v "#"

OMS_HOST=omsserver
EM_UPLOAD_PORT=4903
AGENT_BASE_DIR=/u01/app/oracle/product/13.5.0/agent_1
AGENT_PORT=3872
EM_INSTALL_TYPE="AGENT"

Install agent now.

$ /tmp/agentimage/agentDeploy.sh RESPONSE_FILE=agentimage/agent.rsp
...
..
Waiting for agent targets to get promoted...
Successfully Promoted agent and its related targets to Management Agent

How to Add a Disk into ASM DiskGroup Safely

For a client, there are situations when adding a disk into ASM disk group failed, finally rebooting the server is required to resolve this issue.

According to Oracle support suggestion, we can create a test diskgroup by using this new disk, if everything is successful, then we can drop this test diskgroup, and add the new disk into target diskgroup.

It is a good practice specially for critical production environment.

Check the new disk is a “CANDIDATE”

$sqlplus / as sysasm 


SQL>select INST_ID,GROUP_NUMBER,DISK_NUMBER,MOUNT_STATUS,HEADER_STATUS,
MODE_STATUS,STATE,REDUNDANCY,OS_MB,OS_MB,TOTAL_MB,NAME,
FAILGROUP,PATH
from gv$asm_disk
where PATH like '/dev/mapper/prod_data_303p1'
order by 1,2,3;

Create a Test Diskgroup

Create a test diskgroup “TEMP_TEST”, and check disk status is “MEMBER”

SQL> CREATE DISKGROUP TEMP_TEST EXTERNAL REDUNDANCY disk '/dev/mapper/prod_data_303p1' NAME TEMP_TEST_0001;


Diskgroup created.
SQL>select INST_ID,GROUP_NUMBER,DISK_NUMBER,MOUNT_STATUS,HEADER_STATUS,
MODE_STATUS,STATE,REDUNDANCY,OS_MB,OS_MB,TOTAL_MB,NAME,
FAILGROUP,PATH
from gv$asm_disk
where PATH like '/dev/mapper/prod_data_303p1'
order by 1,2,3;

Mount the Test Diskgroup on Other Nodes

Mount the test diskgrop on all the rest ASM nodes to make sure all working fine.

$sqlplus / as sysasm

SQL>set pagesize 100
SQL>set linesize 300
SQL>select INST_ID,GROUP_NUMBER,NAME,STATE,TOTAL_MB,FREE_MB,
COMPATIBILITY,DATABASE_COMPATIBILITY
from gv$asm_diskgroup
where name='TEMP_TEST'
order by 1,2;
SQL> alter diskgroup TEMP_TEST mount;


Diskgroup altered.
SQL>select INST_ID,GROUP_NUMBER,NAME,STATE,TOTAL_MB,FREE_MB,
COMPATIBILITY,DATABASE_COMPATIBILITY
from gv$asm_diskgroup
where name='TEMP_TEST'
order by 1,2;

Dismount the Test Diskgroup on Other Nodes

Dismount the test diskgroup on all the other nodes except the first node for dropping in the next step.

SQL> alter diskgroup TEMP_TEST dismount;


Diskgroup altered.

SQL>select INST_ID,GROUP_NUMBER,NAME,STATE,TOTAL_MB,FREE_MB,
COMPATIBILITY,DATABASE_COMPATIBILITY
from gv$asm_diskgroup
where name='TEMP_TEST'
order by 1,2;

Drop the Test Diskgroup

Drop the test diskgroup on first node where the test diskgroup is still mounted.

SQL> DROP DISKGROUP  TEMP_TEST ;


Diskgroup dropped.

And check the new disk header status is “FORMER”, which is available for adding into target diskgroup now.

SQL>select INST_ID,GROUP_NUMBER,DISK_NUMBER,MOUNT_STATUS,HEADER_STATUS,
MODE_STATUS,STATE,REDUNDANCY,OS_MB,OS_MB,TOTAL_MB,NAME,
FAILGROUP,PATH
from gv$asm_disk
where PATH like '/dev/mapper/prod_data_303p1'
order by 1,2,3;

Add Disk into Target Diskgroup

Now it is time to add the new disk into target diskgroup.

SQL> set time on

08:08:17 SQL> ALTER DISKGROUP PROD_DATA ADD DISK '/dev/mapper/prod_data_303p1' NAME PROD_DATA_0012;

Diskgroup altered.

Then check disk and diskgroup status

09:09:01 SQL>select INST_ID,GROUP_NUMBER,DISK_NUMBER,MOUNT_STATUS,
HEADER_STATUS,MODE_STATUS,STATE,REDUNDANCY,
OS_MB,OS_MB,TOTAL_MB,NAME,FAILGROUP,PATH
from gv$asm_disk
where PATH like '%prod_data%'
order by 1,2,3;
09:09:14 SQL>  select INST_ID,GROUP_NUMBER,NAME,STATE,TOTAL_MB,FREE_MB,
COMPATIBILITY,DATABASE_COMPATIBILITY
from gv$asm_diskgroup
where name='PROD_DATA' ;

Monitor and Check Rebalance

00:10:35 SQL> select GROUP_NUMBER,OPERATION,STATE,POWER,ACTUAL,
SOFAR,EST_WORK,EST_RATE,EST_MINUTES
from v$asm_operation;