How to put Cloud Director 10.1 Multi-cell appliances with embedded DB into Maintenance-mode

In this short post I wanted to describe a procedure on how you should put you Cloud Director 10.1 appliances with the embedded PostgreSQL DB into maintenance mode.
Both for the VCD Service and also the DB to be moved if the cell is a Primary cell in the DB Cluster.

The case of going into Maintenance can be that you need to perform a planned upgrade or decommission a cell. If the appliance cell is holding the Primary PostgreSQL DB role, you also fail the primary role over to a Standby DB Cell and execute the following commands:

On all Cells that are members of the DB Cluster run the below command to put them in Maintenance mode:

/opt/ vmware/vcloud-director/bin/cell-management-tool -u administrator cell –maintenance true

On a Cell that is DB Standby:

sudo -i -u postgres
/opt/vmware/vpostgres/current/bin/repmgr standby switchover -f /opt/vmware/vpostgres/current/etc/repmgr.conf –siblings-follow

– Finally, remove all cells from Maintenance mode:

/opt/vmware/vcloud-director/bin/cell-management-tool -u administrator cell –maintenance false

Then you can access UI.

The wording mentioned at VMware documentation site is a bit confusion for this that’s the reason I wanted to explain a bit more.
Link