How do you change the location of the storage dir from the base location "/var/lib/heavydb/storage"?
Suppose I store other memory intensive applications on my main hard drive the one that's mounted to /var/lib , how do I point heavydb's storage location somewhere else?
I resolved this by changing the parameter "data" in
/var/lib/heavy/heavy.conf
to
data = "/mnt/data10/storage"
Although, it is not recommended in this article https://support.heavy.ai/hc/en-us/articles/18704796574615-Physical-Backups-on-HeavyDB#:~:text=The%20default%20base,daily%20administrative%20tasks.
And while I had some trouble starting heavydb, I resolved the errors by directly running:
/opt/heavyai/bin/heavydb --config /var/lib/heavyai/heavy.conf
then I created missing folders and missing symlinks by hand or copying files over from the old `catalogs` folder.
-
Hello George,
Apologies for the delay in responding to your question.
In the event that you need to utilize a different file system than the one mounted by root, please follow these instructions:
1. Stop the server.
2. Back up the current files and directories stored in the /var/lib/heavyai/storage directory.
3. Mount the new file system to the desired location, which can either be the original /var/lib/heavyai/storage or a different position such as '/mnt/data10/storage'.
4. Restore your backup to the new file system location.
If you've mounted the new file system over the original position, simply start the server, and everything should function correctly. However, if you've chosen a different position like '/mnt/data10/storage', you'll need to modify the heavy.conf file.
For Docker users, the process may be more intricate. You will need to map the new position in the docker container, which may involve remapping the file system position in the yml file or creating a new container instance.
When I wrote that it is better to go with the default path to simplify the administration of multiple systems, and because of the Docker stuff, but it's okay to change the path if needed and documented in your organization.
btw you need to copy all the files and directory rather than the catalogs only. In the catalogs, only the metadata of the database is stored, so you need to copy at least anything in the data directory.
Please sign in to leave a comment.
Comments
1 comment