cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5301
Views
30
Helpful
7
Replies

ANSWERED - How to change PI HA role from Primary to Secondary

Martin Gramlick
Level 1
Level 1

I found this link describing a CLI script to allow you to change your PI role.

https://wirelessforccie.com/2015/04/04/how-to-convert-cisco-prime-infrastructure-primary-server-to-a-secoundary-server/

I have run this script and now my new HA Secondary server is syncronizing with the Primary.  I'm not sure why all the ps commands in the beginning but the script worked.

pi-hostname/admin# shell
Enter shell access password :
Starting bash shell ...
ade # sudo su
ade # cd /opt/CSCOlumos/bin
ade # ./hamode.sh secondary
HA mode is : primary
Setting HA mode to 'secondary'
Setting HA mode to 'secondary'
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Changing HA mode will result in *LOSS* of any data currently on the system
Enter 'yes' to proceed ....

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
yes
Setting HA mode to 'secondary'
 
ade # exit
exit
ade # exit
exit

pi-hostname/admin# ncs stop
Stopping Prime Infrastructure...
...
Completed shutdown of all services

pi-hostname/admin# ncs start
Starting Prime Infrastructure...
...
Prime Infrastructure started successfully.

Completed in 1126 seconds

pi-hostname/admin# ncs ha authkey **************
Going to update Secondary authentication key
Successfully updated Secondary authentication key in standalone server

7 Replies 7

jmckay0426
Level 1
Level 1

It worked for me too! Thanks for posting!!

J.McKay

Thanks a lot for your help !!

briandungan
Level 1
Level 1

I receive the error, "No input arguments are allowed to this script." when attempting "./hamode.sh secondary"

Getting the same thing here.  PI 3.3 after an upgrade, where the secondary decided it would become primary because it felt like it.  Maybe it was the beautiful weather outside.

Hello Team

 

I received the same error cannot change the role from in HA from Primary to secondary for appliance in 3.3 Version

Hello Team,

 

PRIME/admin# shell
Enter shell access password :
Starting bash shell ...
ade # sudo su
ade # cdp /opt/CSCOlumos/bin
bash: cdp: command not found
ade # cdp /opt/CSCOlumos/bin/
bash: cdp: command not found
ade # cdp /opt/CSCOlumos/bin
bash: cdp: command not found
ade # cdp /opt/CSCOlumos/
bash: cdp: command not found
ade # cd /opt/CSCOlumos/bin
ade # ./hamode.sh secondary
HA mode is : primary
No input arguments are allowed to this script.
ade #

 

below error while changing role in 3.3

 

please help, i don't want to re-install the server

For anyone still looking for answers to this for 3.3/3.4, here is the answer.

 

https://supportforums.cisco.com/t5/security-and-network-management/how-to-run-setup-script-again-on-prime-infrastructure-2-2/m-p/2637739/highlight/false#M45343

 

Towards the end, last reply by DanLeeRankin worked for me at 3.4, where I had both servers as Primary and I needed one to be converted as secondary to join the two in HA.

SSH to the node that you want to change
to secondary.
Type in following:
shell
(will prompt to create password if not already done for shell)
sudo /opt/CSCOlumos/bin/setup.sh

This will now restart the setup and potentially will only ask if this will
be used as secondary HA and then supply the HA Authen key.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: