Removing unassigned nodes

To be completely removed from the infrastructure, the node must not be a part of the storage cluster.

Prerequisites

To remove a node from the infrastructure

Admin panel

  1. Select the unassigned node on the Infrastructure > Nodes screen, and then click Remove.
  2. For security purposes, clean up the node certificates and identity:

    • For an online node, run the following commands:

      # /usr/libexec/vstorage-ui-agent/bin/generate_id.sh --rewrite-ids
      # rm -rf /var/lib/pgsql/*
      # rm -rf /usr/libexec/vstorage-ui-backend/backups/*
      # rm -rf /usr/libexec/vstorage-ui-backend/etc/backend.cfg
    • For an offline node, run the following commands once it becomes available again:

      # rm -rf /usr/libexec/vstorage-ui-backend/ca
      # rm -rf /etc/nginx/ssl
      # /usr/libexec/vstorage-ui-agent/bin/generate_id.sh --rewrite-ids
      # rm -rf /var/lib/pgsql/*
      # rm -rf /usr/libexec/vstorage-ui-backend/backups/*
      # rm -rf /usr/libexec/vstorage-ui-backend/etc/backend.cfg

    After such a cleanup, the only way to add the node back to the cluster is by re-installing Virtuozzo Hybrid Infrastructure on it from scratch.

Command-line interface

  1. Unregister the node from Virtuozzo Hybrid Infrastructure by using the vinfra node forget command. For example, to unregister the node node005, run:

    # vinfra node forget node005
  2. For security purposes, clean up the node certificates and identity:

    • For an online node, run the following commands:

      # /usr/libexec/vstorage-ui-agent/bin/generate_id.sh --rewrite-ids
      # rm -rf /var/lib/pgsql/*
      # rm -rf /usr/libexec/vstorage-ui-backend/backups/*
      # rm -rf /usr/libexec/vstorage-ui-backend/etc/backend.cfg
    • For an offline node, run the following commands when it becomes online:

      # rm -rf /usr/libexec/vstorage-ui-backend/ca
      # rm -rf /etc/nginx/ssl
      # /usr/libexec/vstorage-ui-agent/bin/generate_id.sh --rewrite-ids
      # rm -rf /var/lib/pgsql/*
      # rm -rf /usr/libexec/vstorage-ui-backend/backups/*
      # rm -rf /usr/libexec/vstorage-ui-backend/etc/backend.cfg

    After such a cleanup, the only way to add the node back to the cluster is by re-installing Virtuozzo Hybrid Infrastructure on it from scratch.