Relocate storage node on GNU/Linux

Step 1: Copy the data

Start by copying the data from the source machine to the target machine. We recommend using the rsync utility to cut the downtime while the node is unavailable. You can install it either on the source machine or on the target machine as in the current example.

  1. Start a terminal emulator on the target machine and install rsync (if you do not have it yet)
    • Debian and Ubuntu: # apt-get install rsync
    • CentOS, RHEL, and SUSE: # yum install rsync
  2. Create a directory on the target machine where you want to copy the data – for example /storage_new
    # mkdir /storage_new
  3. Copy the data from the source machine to the target machine. Keep the storage node service ("CloudStorageController" or "ProcessController" in the older versions) running to decrease the downtime for the Backup Managers using it. Format the command in the following way:
    # rsync -av --progress <username@source_machine_IP/source_directory/> <target_directory>

For example:

# rsync -av --progress root@192.168.0.123:/storage_orig/ /storage_new/
rsync.exe -av --progress /cygdrive/x/FtpStorage/ /cygdrive/e/FtpStorage
15942 ?        Ssl    0:00 /opt/mxb/bin/CloudStorageController serve

Step 2: Stop the storage node service

Start a terminal emulator on the source machine and stop the storage node service (detailed instructions).

The downtime has started.

Step 3: Copy new data

Now it is necessary to copy the most recent backup data that might have accumulated on the source storage node after the initial synchronization session. We recommend copying the data with the --delete option (it removes temporary files from the target directory).

rsync -av --progress --delete root@192.168.0.123:/storage_orig/ /storage_new/

Once finished with the final synchronization, the original and target folders will contain exactly the same data.

Step 4: Create a user for storage node access

Create a new user and a group named "iasouser" with GUID 2001 on the new storage node.

  1. Start the terminal emulator and create a group: groupadd -g 2001 iasouser
  2. Then create a user in that group: useradd -u 2001 -g 2001 iasouser

Step 5: Install storage node software to new hardware

  1. Copy the original storage node installation folder from the original machine
    rsync -av --progress root@192.168.0.123:/opt/mxb /opt/
  2. Download a storage node installation package for your operating system:
    wget -c https://cdn.cloudbackup.management/maxdownloads/mxb-cloud-sn-linux-x86_64.run
  3. Give execute permissions to the file:
    chmod +x ./mxb-cloud-sn-linux-x86_64.run
  4. Run the Storage Node Installer: ./mxb-cloud-sn-linux-x86_64.run
  5. Select the Reconfigure option and complete the installation. You can use a different IP address but it is important that the primary properties stay unchanged:
    • Storage node name (-storage-node-name)
    • Storage pool name (-storage-name)

Result

The migration is completed. All the devices will be automatically connected to the new storage node within the next 30 minutes.

If you want to make sure the storage node has started working on the new hardware, check the Nginx access log for incoming connections. There should be a lot of 201\207 requests there.

tail -f /opt/mxb/var/log/nginx/nginx-access.log

Another way to verify the migration is through the Cloud Management Console (Manage > View storage statistics).