influxdata / influxdata/influxdb

(Migrating from 1.x) 2.7.10 .deb packages installs in /var/lib/influxdb/.influxdbv2/, not /var/lib/influxdb/

Open
#25,305 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

[The docs](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=Linux#installed-as-a-package) specify that installing from .deb package installs in `/var/lib/influxdb/...`. However, on my server, things are in `/var/lib/influxdb/.influxdbv2`.

I installed by upgrading from InfluxDB v1. This might be due to me screwing something up while upgrading.

__Steps to reproduce:__

Install InfluxDB v1 .deb.
Run InfluxDB v1.

Install InfluxDB v2 .deb.
Migrate.

__Expected behaviour:__

Stuff in `/var/lib/influxdb/...` as shown in the docs.

__Actual behaviour:__

Stuff in `/var/lib/influxdb/.influxdbv2...` as if running standalone, sort of.

/etc/systemd/system/influxd.service
EnvironmentFile=-/etc/default/influxdb2

/etc/default/influxdb2
INFLUXD_CONFIG_PATH=/etc/influxdb/config.toml

/etc/influxdb/config.toml does not exist
/etc/influxdb/influxdb.conf still there

/var/lib/influxdb/.influxdbv2
configs
config.toml
engine/
influxd.bolt
influxd.sqlite

/var/lib/influxdb/.influxdbv2/config.toml
bolt-path = "/var/lib/influxdb/.influxdbv2/influxd.bolt"
engine-path = "/var/lib/influxdb/.influxdbv2/engine"
http-bind-address = "localhost:8086"
storage-series-id-set-cache-size = 100

__Environment info:__

Linux 5.10.0-26-cloud-amd64 x86_64

AFAIU, the systemd file points to the default config file location in /etc/influxdb/ but since that file is missing influxd defaults to standalone location.

It is not that bad, I mean it works, but it is kind of surprising. I had to search for my data. And since it is non-standard and works due to a default behaviour on a missing config file, I'm worried this might catch me some day in a later upgrade.

Contributor guide

Open the contributing guide

Research direction

Start by comparing /etc/systemd/system/influxd.service, /etc/default/influxdb2, and the documented package layout, then reproduce the stated v1 .deb to v2 .deb migration. Done means the upgrade uses the documented /var/lib/influxdb path, or the documentation and configuration behavior clearly explain the .influxdbv2 location.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
databases, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.