Trying to get influxdb to store database on a network share


New to this forum. I have spent days trying to get influxdb2 to use a shared mount. In the beginning I did get it working, but the next morning it stopped. I tried to get it working again but failed. I spun up an LXC in Proxmox to have a fresh setup, no go. Then created a new VM on Ubuntu 22.04 LTS. Base install, updates. Got the file storage mount working. Installed influxdb2 this time the influxd binary as I installed the package version2.5.1. The previous version I worked with was 2.6. The user and group ownership was set to influxdb on the share. influxdb started and I was able to create my buckets and APIs. Had 3 systems sending data and I could see info on the dashboards. Next, stop the service and modify the config to point to the share. Start the service again. I can see the influxd.bolt file being created and grow in size to 64K. Then influd.sqlite file shows up at 0K. Then I see that the influx service has failed look at journalctl and sometimes the database fails and other times it is locked.

I started influxd like this as one example of my testing:
influxd --bolt-path string=/mnt/influxdb/influxd.bolt --engine-path string=/mnt/influxdb/engine

I am missing something simple or just looking in the wrong areas. I have searched for a few days and and so far, have not found any solutions. I have read the docs on the influxdb site as well. I am ready to pull out the last few small fuzzy hairs out of my head. I need to use an external share as I don’t have room for databases and such locally on my VM system.

I am still a newbie to ubuntu and freebsd. Only playing with them for about 2 years on and off. I am running 3 systems with truenas core, 2 system with proxmox. One of them for my beefier VMs (Ubuntu mostly and a couple of Win10 VMs. The other is for LXCs. Currently have LXCs for MQTT broker, ESPHome, node-red and zigbee2mqtt. So, I am not totally green.

Any help will be gratefully appreciated.


Hello @rock1984,
Can you please share error messages you got?
Can you also share how you modified the config?
Thank you

Hi @Anaisdg.

I lost my captures of when I was running influxdb as a package. My windows machine decided to a reboot on me during the night (without my permission). The errors were the database is locked and I can’t remember the other one, but had to do with the database as well.

With the binary install of influxdb, here is what I get:
asm@influxdbv2:/etc$ influxd --bolt-path /mnt/influxdb/influxd.bolt --engine-path /mnt/influxdb/engine
2023-03-20T13:19:23.724534Z info Welcome to InfluxDB {“log_id”: “0ggndIJ0000”, “version”: “v2.5.1”, “commit”: “5b6fdbf05d”, “build_date”: “2022-11-02T18:06:28Z”, “log_level”: “info”}
2023-03-20T13:19:23.774769Z info Resources opened {“log_id”: “0ggndIJ0000”, “service”: “bolt”, “path”: “/mnt/influxdb/influxd.bolt”}
2023-03-20T13:19:23.774900Z info Resources opened {“log_id”: “0ggndIJ0000”, “service”: “sqlite”, “path”: “/mnt/influxdb/influxd.sqlite”}
2023-03-20T13:19:23.793399Z info Bringing up metadata migrations {“log_id”: “0ggndIJ0000”, “service”: “KV migrations”, “migration_count”: 20}
2023-03-20T13:19:26.701659Z info Bringing up metadata migrations {“log_id”: “0ggndIJ0000”, “service”: “SQL migrations”, “migration_count”: 8}
2023-03-20T13:19:31.723642Z error Failed to apply SQL migrations {“log_id”: “0ggndIJ0000”, “error”: “database is locked”}
Error: database is locked

I see the influxd.bolt file being created. Then influxd.sqlite along with influxd.sqlite-journal stay at 0 bytes and then influxd stops.

When I was running the package, here is what I changed in the configs.

Where the metadata/raft database is stored

dir = “/mnt/influxdb/influxdb/meta”

The directory where the TSM storage engine stores TSM files.

dir = “/mnt/influxdb/influxdb/data”

The directory where the TSM storage engine stores WAL files.

wal-dir = “/mnt/influxdb/influxdb/wal”

bolt-path = “/mnt/influxdb/influxd.bolt”
engine-path = “/mnt/influxdb/engine”

With the binary install, here is how I invoke influxdb:

influxd --bolt-path /mnt/influxdb/influxd.bolt --engine-path /mnt/influxdb/engine