# Moving Datacenter

**URL:** <https://forums.percona.com/t/moving-datacenter/7652>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [May 25, 2020, 4:35am UTC](https://forums.percona.com/t/moving-datacenter/7652 "2020-05-25T04:35:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giovanni\_Vecchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/giovanni_vecchi/32/2415_2.png) [@Giovanni\_Vecchi](https://forums.percona.com/u/Giovanni_Vecchi)\
**Post date:** [May 25, 2020, 4:35am UTC](https://forums.percona.com/t/moving-datacenter/7652/1 "2020-05-25T04:35:55Z")

</div>

Hi guys,  
  
our current scenario is the following:  
- 5 nodes PXC&nbsp;  
- DC1 (AWS): 3 nodes spanned on 3 different AZ  
- DC2 (on-prem): 2 nodes  
  
DC2 is going to be decomissioned in order to deploy the new one DC3 in a different location, with different hardware and different subnets.  
DC3 will come up after DC2 complete decomissioning, so I need to reduce PXC Cluster removing DC2 nodes and then put 2 DC3 nodes into the cluster&nbsp;sequentially.  
What’s the best practices to do that with less downtime possible? Do I need to completely shutdown the cluster in order ro reduce it?  
  
Thanks

---

<div class="post-metadata">

**Author:** ![Giovanni\_Vecchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/giovanni_vecchi/32/2415_2.png) [@Giovanni\_Vecchi](https://forums.percona.com/u/Giovanni_Vecchi)\
**Post date:** [May 28, 2020, 4:57am UTC](https://forums.percona.com/t/moving-datacenter/7652/2 "2020-05-28T04:57:48Z")

</div>

I think I could answer to my own question after some studying and test sessions: the cluster does not need to&nbsp;completely&nbsp;shutdown and nodes can be removed and added as soon as quorum is kept on DC1 and mysql is graceful shutdowned on decomissioned nodes.  
The only document I found where the safely nodes removal is clearly documented is the MariaDB cookbook:

> [@](#):
>
> _Dropping a node from MariaDB Galera Cluster_  
> _MariaDB Galera Cluster exists so that we can eliminate single points of failure in our infrastructure. Once set up, **a single node can be taken out of the cluster for maintenance without impacting the rest of the cluster** or causing downtime for our applications.  
> …_  
> _1. On db03, run the following command to check whether the node is up to date:_  
> _&nbsp; mysql -e “SHOW STATUS LIKE ‘wsrep\_local\_state\_comment’”_  
> _2. If the value is synced, then the node is up to date and we can safely shut down the__node with the following command:_  
> _&nbsp; sudo&nbsp; &nbsp;service mysql stop_  
> _3. On the other cluster nodes, run the following command to check whether the node__has been destroyed:_  
> _&nbsp; mysql -e “SHOW STATUS LIKE ‘wsrep\_%’”_  
> _4. We’ll know the node is destroyed if the number of nodes in wsrep\_cluster\_size i__s 2 and the IP address of db03 is not listed in wsrep\_incoming\_addresses._
