Tuesday, January 20, 2015

Manually Deactivating a Nutanix Protection Domain

Nutanix Protection Domains are either Active or Inactive, depending on which cluster is protected (e.g. a Prod site sending data) or unprotected (e.g. a DR site receiving data). I was poking around in my DR cluster and happened upon my inactive Protection Domain. I noticed that when I clicked on the PD name, there was an Activate link in the bottom right corner.


I foolishly decided to click the Activate link, which left me with an active protection domain at both my sites. Replication from Prod to DR immediately stopped working. I expected a Deactivate link to appear in Prism, but it did not. OK, I'm sure there is a way to issue a deactivate command via ncli, right? Well, not exactly.

ncli> protection-domain
add                              create                           remove                           rm                               list                             ls
activate                         rollback-pd                      migrate                          list-snapshots                   ls-snaps                         add-minutely-schedule
add-hourly-schedule              add-daily-schedule               add-weekly-schedule              add-monthly-schedule             remove-from-schedules            clear-schedules
ls-schedules                     set-retention-policy             clear-retention-policy           ls-pending-one-time-snapshots    add-one-time-snapshot            create-one-time-snapshot
rm-one-time-schedules            restore-snapshot                 protect                          unprotect                        rm-snap                          rm-snapshot
list-replication-status          ls-repl-status                   retain-snap                      retain-snapshot                  pause-repl                       pause-replication
resume-repl                      resume-replication               abort-repl                       abort-replication                ls-pending-actions               metro-avail-enable
metro-avail-disable              promote-to-active

There is an 'activate' command, but no 'deactivate' command. So how do I get rid of this thing? I searched high and low, including the Nutanix Bible, but I couldn't find a way to do it. A simple Nutanix support request later, and I was given this hidden command. 

ncli pd deactivate_and_destroy_vms name=MSP-PD

Think about what you are doing before you issue this command. There is a reason it's not shown in ncli. The "_and_destroy_vms" portion of that command should give you a clue as to the potential impact. USE AT YOUR OWN RISK

As soon as I issued this command, I got a message back that said the PD was marked for removal. A few seconds later, my protection domain was again shown as inactive in Prism, and the replication jobs from my Production site started working again.

I should note that even though the command seems to indicate that it's going to destroy data, all of my snapshots at the remote site were still intact, so subsequent replications were not full replications. 

1 comment:

  1. Hi Bro, so many thanks to you.. hope you being an expert for everyhing you like

    ReplyDelete