← Back to team overview

graphite-dev team mailing list archive

Re: [Question #206333]: Moving the storage directory

 

Question #206333 on Graphite changed:
https://answers.launchpad.net/graphite/+question/206333

    Status: Open => Answered

rowan proposed the following answer:
Hi Victor,

I did this just now, and in addition to changing the STORAGE_DIR
variable in "/opt/graphite/conf/carbon.conf" and
"/opt/graphite/webapp/graphite/local_settings.py" (both paths assuming a
default installation to "/opt/graphite"), I also had to set the
GRAPHITE_STORAGE_DIR environment variable.

You have to set this, because in some places
("webapp/graphite/settings.py") the webapp only checks the environment
variable, or defaults to GRAPHITE_ROOT + 'storage' - it doesn't check
the values set in carbon.conf or local_settings.py (but you still need
to set them, so they can be read by other parts of the codebase). I will
create an issue for this on Github, and submit a patch when I get time
(shouldn't be too long). In the short term, just set the environment
variable and it will work.

Setting environment variables system-wide obviously varies from system to system. On Ubuntu you can add a line to "/etc/environment" like this:
 GRAPHITE_STORAGE_DIR="/mnt/graphite-storage"

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.