Change ATSD Data Directory

Grant ownership of the new data directory to the axibase user.

sudo chown -R axibase:axibase /path/to/data-dir

Switch to axibase user.

su axibase

Stop ATSD.

/opt/atsd/bin/ stop

Copy data to the new target directory.

cp -a /opt/atsd/hdfs-data/ /path/to/data-dir/
cp -a /opt/atsd/hdfs-data-name/ /path/to/data-dir/
cp -a /opt/atsd/hdfs-cache/ /path/to/data-dir/

Backup the old directories.

mkdir /opt/atsd/old
mv /opt/atsd/hdfs* /opt/atsd/old/

Backup the configuration files.

cp /opt/atsd/hadoop/conf/hdfs-site.xml /opt/atsd/hadoop/conf/hdfs-site.xml.backup
cp /opt/atsd/hadoop/conf/core-site.xml /opt/atsd/hadoop/conf/core-site.xml.backup

Open the /opt/atsd/hadoop/conf/hdfs-site.xml file.

Set property to /path/to/data-dir/hdfs-data-name.

Set to /path/to/data-dir/hdfs-data.


Open the /opt/atsd/hadoop/conf/core-site.xml file.

Set the hadoop.tmp.dir property to /path/to/data-dir/hdfs-cache.

    <description>A base for other temporary directories.</description>

Start ATSD services.

/opt/atsd/bin/ start

Verify that all old data is available and that any expected new data is incoming.

Delete the old data and configuration files.

rm -r /opt/atsd/old
rm /opt/atsd/hadoop/conf/core-site.xml.backup
rm /opt/atsd/hadoop/conf/hdfs-site.xml.backup