Previous page

Next page

Locate page in Contents

Print this page

Configuring Replication Parameters

The cluster replication parameters define

  • The normal number of replicas of a data chunk . When a new data chunk is created, Parallels Cloud Storage automatically replicates it until the normal number of replicas is reached.
  • The minimum number of replicas of a data chunk (optional) . During the life cycle of a data chunk, the number of its replicas may vary, sometimes falling below the defined minimum. In such a case, all write operations to the affected replicas are suspended until their number reaches the defined normal value.

To check the current replication parameters applied to a cluster, you can use the pstorage get-attr command. For example, if your cluster is mounted to the /pstorage/pcs1 directory, you can run the following command:

# pstorage get-attr /pstorage/pcs1

connected to MDS#1

File: '/pstorage/pcs1'

Attributes:

...

replicas=1:1

...

As you can see, the normal and minimum numbers of chunk replicas are set to 1.

Initially, any cluster is configured to have only 1 replica per each data chunk, which is sufficient to evaluate the Parallels Cloud Storage functionality using one server only. In production, however, to provide high availability for your data, you are recommended to

  • configure each data chunk to have at least 3 replicas,
  • set the minimum number of replicas to 2.

Such a configuration requires at least 3 chunk servers to be set up in the cluster.

To configure the current replication parameters so that they apply to all virtual machines and Containers in your cluster, you can run the pstorage set-attr command on the directory to which the cluster is mounted. For example, to set the recommended replication values to the pcs1 cluster mounted to /pstorage/pcs1 , set the normal number of replicas for the cluster to 3:

# pstorage set-attr -R /pstorage/pcs1 replicas=3

The minimum number of replicas will be automatically set to 2 by default.

Note: For information on how the minimum number of replicas is calculated, see the pstorage-set-attr man page.

Along with applying replication parameters to the entire contents of your cluster, you can also configure them for specific directories and files. For example:

# pstorage set-attr -R /pstorage/pcs1/private/101 replicas=3