Previous page

Next page

Locate page in Contents

Print this page

Removing Chunk Servers

If you need to remove a chunk server from the cluster, for example, to perform some maintenance tasks on it, do the following:

  1. Make sure that
    • The number of chunk servers configured for your cluster is enough to store the required number of data chunks (that is, equals or exceeds the current replication value).
    • The chunk servers have enough disk space to store the chunks.

    For instructions on obtaining this information, see Monitoring Chunk Servers . If you need to add a new chunk server to the cluster before removing an active one, see Setting Up Chunk Servers .

  2. Find out the index number of the chunk server you want to remove by running the following command on some of your cluster servers:

    # pstorage -c pcs1 top

    This will display detailed information about the pcs1 cluster. Locate the section with the information about chunk servers, for example:

    ...

    CSID STATUS SPACE FREE REPLICAS IOWAIT IOLAT(ms) QDEPTH HOST

    1025 active 105GB 88GB 40 0% 0/0 0.0 10.30.17.38

    1026 active 105GB 88GB 40 0% 0/0 0.0 10.30.18.40

    1027 active 105GB 99GB 40 0% 0/0 0.0 10.30.21.30

    1028 active 107GB 101GB 40 0% 0/0 0.0 10.30.16.38

    ...

    The CSID column displays the index number of chunk servers. In the output above, four chunk servers are configured for the pcs1 cluster. They have index numbers of 1025, 1026, 1027, and 1028.

  3. Remove the chunk server from the cluster. For example, to delete the chunk server with index number 1028 from the pcs1 cluster, run this command:

    # pstorage -c pcs1 rm-cs --wait 1028

Once you initiate the delete operation, the cluster starts replicating data chunks that were stored on the removed server and placing them on the remaining chunk servers in the cluster. The --wait option, when specified, tells the command to wait until the operation is complete (which may take a long time).

Notes:

1. If the CS's disk has disappeared from the OS and the CS has no access to its repository, data chunks which need to be replicated will not be accessible and CS removal will not complete. You will need to forcibly remove the CS from the cluster with the -f option. Warning: Do so only if the CS is irreversibly lost. Never remove active chunk servers with the -f option.

2. When deletion is in progress, you can cancel it with the command pstorage -c pcs1 rm-cs --cancel 1028 . This might be useful, for example, if you specified a wrong ID of the chunk server to remove.

To add a removed chunk server back to the cluster, set it up from scratch by following the steps in Setting Up Chunk Servers .