This discussion is archived
4 Replies Latest reply: Jan 22, 2013 6:39 AM by BrianP RSS

EM12cR2 - how to clean up old agent core directories after upgrade?

BrianP Journeyer
Currently Being Moderated
Running EM12cR2+PSU1 on Linux x86-64.

Does anybody know the recommended/supported/correct way to remove old versions of the EM12c agent core directories on managed servers after the agents have been upgraded to EM12cR2? This isn't a huge issue, but I've been setting up my agents on small (2GB) dedicated volumes and I won't have enough space available for the next round of upgrades unless I get the old stuff cleared out.

I have one server that was added to the environment after my EM12cR2 upgrade, and several servers that were already being monitored before the upgrade. The servers where I upgraded the agents after installing EM12cR2 all still have copies of the agent base core/12.1.0.1.0 directory along with the new agent base core/12.1.0.2.0 directory. I've tried removing this directory and bouncing the agent, but the agent gets blocked since it apparently cannot locate some files it expects to find. Other than being rejected by the OMS, the agent appears to function fine. I can only unblock the agent successfully if I put the 12.1.0.1.0 directory back in place.

Here's what I'm seeing on an upgraded agent:
/oraagent> du -sh agent12c
1.5G    agent12c
/oraagent> ls agent12c/core
12.1.0.1.0  12.1.0.2.0
/oraagent> du -sh agent12c/core/*
626M    agent12c/core/12.1.0.1.0
534M    agent12c/core/12.1.0.2.0
/oraagent> emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 2  
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 12.1.0.2.0
OMS Version       : 12.1.0.2.0
Protocol Version  : 12.1.0.1.0
Agent Home        : /oraagent/agent12c/agent_inst
Agent Binaries    : /oraagent/agent12c/core/12.1.0.2.0
On a host that never had the EM12cR1 agent installed, I see:
/oraagent> du -sh agent12c
631M    agent12c
/oraagent> ls agent12c/core
12.1.0.2.0
/oraagent> du -sh agent12c/core/*
534M    agent12c/core/12.1.0.2.0
/oraagent> emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 12.1.0.2.0
OMS Version       : 12.1.0.2.0
Protocol Version  : 12.1.0.1.0
Agent Home        : /oraagent/agent12c/agent_inst
Agent Binaries    : /oraagent/agent12c/core/12.1.0.2.0
Interestingly the inventory.xml in the oraInventory on the upgraded server still contains references to the 12.1.0.1.0 directory that seem useless:
<HOME NAME="agent12c2" LOC="/oraagent/agent12c/core/12.1.0.2.0" TYPE="O" IDX="1">
   <REFHOMELIST>
      <REFHOME LOC="/oraagent/agent12c/sbin"/>
      <REFHOME LOC="/oraagent/agent12c/plugins/oracle.sysman.db.discovery.plugin_12.1.0.2.0"/>
      <REFHOME LOC="/oraagent/agent12c/core/12.1.0.1.0/../../plugins/oracle.sysman.db.agent.plugin_12.1.0.2.0"/>
      <REFHOME LOC="/oraagent/agent12c/plugins/oracle.sysman.oh.discovery.plugin_12.1.0.2.0"/>
      <REFHOME LOC="/oraagent/agent12c/plugins/oracle.sysman.oh.agent.plugin_12.1.0.2.0"/>
      <REFHOME LOC="/oraagent/agent12c/plugins/oracle.sysman.emas.discovery.plugin_12.1.0.3.0"/>
      <REFHOME LOC="/oraagent/agent12c/plugins/oracle.sysman.xa.discovery.plugin_12.1.0.3.0"/>
   </REFHOMELIST>
</HOME>
[...]
<HOME NAME="OraHome6" LOC="/oraagent/agent12c/core/12.1.0.1.0/../../plugins/oracle.sysman.db.agent.plugin_12.1.0.2.0" TYPE="O" IDX="8">
   <DEPHOMELIST>
      <DEPHOME LOC="/oraagent/agent12c/core/12.1.0.2.0"/>
   </DEPHOMELIST>
</HOME>
The agent upgrades were all performed through the agent upgrade console without incident. The OMS server itself also contains both 12.1.0.1.0 and 12.1.0.2.0 in the agent base core directory. The fact that the agent on the server that never had 12.1.0.1.0 installed is working fine would seem to indicate that the 12.1.0.1.0 binaries aren't required for proper functionality, but I'm just not clear on how to remove them. I would like to avoid losing the targets monitored by these agents and having to recreate them and their jobs and so on.

Any thoughts? Has anybody else had the same issue occur in their environment?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points