Change storage location

Dynatrace Managed stores multiple types of monitoring data that vary depending on the use case. There are default storage locations, as listed in Dynatrace Managed hardware and system requirements.

You may need to change existing paths for the storage locations if:

  • The volume storage is full and you must migrate to a larger volume.
  • Current storage location is on a temporary volume and you must migrate it to another volume.
  • Current storage location is on a shared volume and you want to move the data to a dedicated volume.

To change the paths to these storage locations

Back up your data.

Important

An error in this procedure can result in data loss. We advise you to back up all of the storage files to a safe location before proceeding. If possible, execute this procedure first on a test deployment.

Stop all Dynatrace services on the node.
By default, the script is located at <PRODUCT_PATH>/launcher/. Make sure the dynatrace.sh script has executable permissions. Once executed, wait for the script to finish and make sure that no Dynatrace services are running.

<PRODUCT_PATH>/launcher/dynatrace.sh stop

Move the data store to the new location.
Keep in mind that you can't nest datastores within each other. For example, Cassandra storage can't be a subdirectory of session storage.

Ensure that the user dynatrace:dynatrace is the owner of this new directory.

[root@host]# chown -R dynatrace:dynatrace /new_location 

Update the new data location in /etc/dynatrace.conf.
The location must be either an absolute path or a value based on predefined variables. It must be a directory, and it can't be a symlink.
Update the following section:

# Paths to directories with component's data 
DATASTORE_PATH = /var/opt/dynatrace-managed 
CASSANDRA_DATASTORE_PATH = DATASTORE_PATH/CASSANDRA_DIR 
ELASTICSEARCH_DATASTORE_PATH = DATASTORE_PATH/ELASTICSEARCH_DIR 
SERVER_DATASTORE_PATH = DATASTORE_PATH/SERVER_DIR 
SERVER_REPLAY_DATASTORE_PATH = SERVER_DATASTORE_PATH/replayData 
NODEKEEPER_DATASTORE_PATH = DATASTORE_PATH/NODEKEEPER_DIR 

Run the reconfigure via the installer.

<PRODUCT_PATH>/installer/reconfigure.sh --no-start

This step is crucial to propagating the changes from /etc/dynatrace.conf to all relevant configuration files. The --no-start flag will allow you to make a final verification of the changes before starting any of the Dynatrace services.

The script output should look similar to the following:

Reconfiguration completed successfully after 1 minute 9 seconds. 
     
Dynatrace binaries are located in directory /opt/dynatrace-managed 
Dynatrace data is located in directory /new_location 
Dynatrace metrics repository is located in directory /new_location/cassandra 
Dynatrace Elasticsearch store is located in directory /new_location/elasticsearch 
Dynatrace server store is located in directory /new_location/sessionstorage 
Dynatrace session replay store is located in directory /new_location/replayData 
Don't forget to start Dynatrace Server and log in at https://<your_ip> 

Start all Dynatrace services.

<PRODUCT_PATH>/launcher/dynatrace.sh start

Check the logs to make sure all services started without issues.