change replication factor on a existing cluster? #776

Closed
opened 2024-03-18 15:09:23 +00:00 by schmitch · 1 comment

Error: Prevous cluster layout has replication factor 3, which is different than the one specified in the config file (2). The previous cluster layout can be purged, if you know what you are doing, simply by deleting the cluster_layout file in your metadata directory.

hello currently I have a replication factor of 3 unfortunatly I wanted to save a little bit of storage is there a way to reduce the replication factor?

> Error: Prevous cluster layout has replication factor 3, which is different than the one specified in the config file (2). The previous cluster layout can be purged, if you know what you are doing, simply by deleting the `cluster_layout` file in your metadata directory. hello currently I have a `replication factor` of `3` unfortunatly I wanted to save a little bit of storage is there a way to reduce the replication factor?
Owner

From the documentation:

It is also technically possible to change the replication mode to a mode with a different numbers of replicas, although it's a dangerous operation that is not officially supported. This requires you to delete the existing cluster layout and create a new layout from scratch, meaning that a full rebalancing of your cluster's data will be needed. To do it, shut down your cluster entirely, delete the custer_layout files in the meta directories of all your nodes, update all your configuration files with the new replication_mode parameter, restart your cluster, and then create a new layout with all the nodes you want to keep. Rebalancing data will take some time, and data might temporarily appear unavailable to your users. It is recommended to shut down public access to the cluster while rebalancing is in progress. In theory, no data should be lost as rebalancing is a routine operation for Garage, although we cannot guarantee you that everything will go right in such an extreme scenario.

So yes it should be possible.

From [the documentation](https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#replication_mode): > It is also technically possible to change the replication mode to a mode with a different numbers of replicas, although it's a dangerous operation that is not officially supported. This requires you to delete the existing cluster layout and create a new layout from scratch, meaning that a full rebalancing of your cluster's data will be needed. To do it, shut down your cluster entirely, delete the custer_layout files in the meta directories of all your nodes, update all your configuration files with the new replication_mode parameter, restart your cluster, and then create a new layout with all the nodes you want to keep. Rebalancing data will take some time, and data might temporarily appear unavailable to your users. It is recommended to shut down public access to the cluster while rebalancing is in progress. In theory, no data should be lost as rebalancing is a routine operation for Garage, although we cannot guarantee you that everything will go right in such an extreme scenario. So yes it should be possible.
lx closed this issue 2024-03-18 19:08:10 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#776
No description provided.