Hi, I am trying to change the data path for InfluxDB addon to an external SSD drive connected to my Pi. I need this as I dont want InfluxDB to be writing to my SD Card and shorten its life. While if I leave the config to defaults , InfluxDB works well , when I change the paths using envars , it does not start up , nor does it throw up an error in the logs
My env is : Raspberry Pi 3 , Hassio , Docker , InfluxDB add on
My configs are as under:
My fstab entries which mounts the external drive:
UUID=8f9c583f-d05c-4bcb-8533-1f43a6cb6994 /mnt/data ext4 defaults,nofail,auto,users 0 0
My mount is working fine , I have verified that although I am not sure if there are permission issues from the user from home assistant as I dont know which user id used to access the drive.
My InfluxDB config:
{
"auth": true,
"reporting": true,
"ssl": true,
"certfile": "fullchain.pem",
"keyfile": "privkey.pem",
"envvars": [
{
"name": "INFLUXDB_DATA_DIR",
"value": "/mnt/data/influxdb/data"
},
{
"name": "INFLUXDB_META_DIR",
"value": "/mnt/data/influxdb/meta"
},
{
"name": "INFLUXDB_DATA_WAL_DIR",
"value": "/mnt/data/influxdb/wal"
}
]
}
I have also verified the influxdb.conf inside the docker container and it does not contain the directories I am setting via the envars entry, not sure why is that so
root@a0d7b954-influxdb:/etc/influxdb# cat influxdb.conf
reporting-disabled = false
[meta]
dir = "/data/influxdb/meta"
[data]
dir = "/data/influxdb/data"
engine = "tsm1"
wal-dir = "/data/influxdb/wal"
[http]
auth-enabled=true
realm = "Hass.io InfluxDB"
log-enabled=false
https-enabled=false
https-certificate="/etc/ssl/influxdb.pem"
https-private-key=""
flux-enabled = true
[logging]
level="warn"
My logs show the following and nothing after this:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
-----------------------------------------------------------
Hass.io Add-on: InfluxDB
Scalable datastore for metrics, events, and real-time analytics
-----------------------------------------------------------
Add-on version: 3.5.1
You are running the latest version of this add-on.
System: Raspbian GNU/Linux 10 (buster) (armv7 / raspberrypi3)
Home Assistant version: 0.103.6
Supervisor version: 195
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] create-users.sh: executing...
[cont-init.d] create-users.sh: exited 0.
[cont-init.d] influxdb.sh: executing...
[cont-init.d] influxdb.sh: exited 0.
[cont-init.d] kapacitor.sh: executing...
[cont-init.d] kapacitor.sh: exited 0.
[cont-init.d] nginx.sh: executing...
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[23:52:13] INFO: Kapacitor is waiting until InfluxDB is available...
[23:52:13] INFO: Chronograf is waiting until InfluxDB is available...
[23:52:13] INFO: Starting the InfluxDB...
A point to note that if I put in the defaults, then InfluxDB works fine.
Can somebody help please?