Hi,
I am trying to upgrade my InfluxDB data from v1.x to v2. I am running “influx upgrade” and receiving the following message:
Error: not enough space on target disk of /root/.influxdbv2: need 105567317717, available 3390648320
My data is stored on a separate drive and mounted as /data. I assume it would put the converted data on that drive but it wants to put it on the primary drive.
How do I tell it to use the drive where the data is?
Thanks in advance!
@cphillips , you can use following two options to specify other target paths (you have to specify both):
-m, --bolt-path string path for boltdb database (default "/root/.influxdbv2/influxd.bolt")
-e, --engine-path string path for persistent engine files (default "/root/.influxdbv2/engine")
E.g. in your case: influxd upgrade -m /data/influxdbv2/influxd.bolt -e /data/influxdbv2/engine
@VlastaHajek - thanks, that worked!
However, when I now try to login to the UI - http://IP:8086 to get to the InfluxDB 2.0 dashboard no matter what credentials I put in, it is saying unable to log me in.
I wrote down what details I entered when performing the upgrade, which is what I assume I should be using?
I need to retrieve my bucket information - this InfluxDB is running a service to Grafana which is currently out of order due to this issue. I am receiving the 401 unauthorized error.
Advise welcomed!
@cphillips , when logging to the InfluxDB 2 UI at http://IO:8086 you have to use credentials specified at the beginning of the upgrade process
@VlastaHajek I am using the credentials I entered when doing the upgrade. I have checked and double checked the password (and username).
Every time it says “Could not sign in” in red at the top right hand corner!
Just to be sure, does InfluxDB log shows it is using the same data path as used when running the upgrade?
@VlastaHajek I have the log from the upgrade and it shows this:
{"level":"info","ts":1607515448.4743729,"caller":"upgrade/setup.go:159","msg":"CLI config has been stored.","path":"/root/.influxdbv2/configs"}
{"level":"info","ts":1607515448.4745796,"caller":"upgrade/database.go:35","msg":"Checking space"}
{"level":"info","ts":1607515448.4838827,"caller":"upgrade/database.go:51","msg":"Disk space info","Free space":"109 GB","Requested space":"106 GB"}
{"level":"info","ts":1607515448.4840283,"caller":"upgrade/database.go:58","msg":"Upgrading databases"}
{"level":"info","ts":1607515448.4841251,"caller":"upgrade/database.go:70","msg":"Upgrading database ","database":"telegraf"}
.....
{"level":"info","ts":1607515448.778397,"caller":"upgrade/database.go:146","msg":"Copying data","source":"/data/influxdb/data/telegraf/autogen","target":"/data/influxdbv2/engine/data/9f349b7588a8523a/autogen"}
{"level":"info","ts":1607516085.200081,"caller":"upgrade/database.go:161","msg":"Copying wal","source":"/data/influxdb/wal/telegraf/autogen","target":"/data/influxdbv2/engine/wal/9f349b7588a8523a/autogen"}
{"level":"info","ts":1607516085.2897074,"caller":"upgrade/database.go:65","msg":"Skipping _internal "}
{"level":"info","ts":1607516085.2909167,"caller":"upgrade/security.go:23","msg":"There are no users in 1.x, nothing to upgrade."}
{"level":"info","ts":1607516085.2924016,"caller":"upgrade/upgrade.go:431","msg":"Upgrade successfully completed. Start service now"}
Is that what you are after?
@cphillips , I mean InfluxDB 2 server log.
How do you run InfluxDB? As a service, installed from deb?
@VlastaHajek It looks as though it has been automatically updated from 1.8.3 to 2.0.1 on 23 November by unattended-upgrades:
zcat history.log.1.gz | grep infl
Upgrade: grafana:amd64 (7.3.1, 7.3.2), influxdb:amd64 (1.8.3-1, 2.0.1)
Pooh
December 9, 2020, 4:21pm
10
@VlastaHajek It looks as though it has been automatically updated from 1.8.3
to 2.0.1 on 23 November by unattended-upgrades:
Unattended upgrades can be dangerous - they don’t read the upgrade release
notes for you
zcat history.log.1.gz | grep infl
Upgrade: grafana:amd64 (7.3.1, 7.3.2), influxdb:amd64 (1.8.3-1, 2.0.1)
This happened to me on the 11th. Fortunately I was able to put things back as
they should be the day afterwards.
Hi.
I’ve been using InfluxDB under Debian Linux for several months, and I have a script which regularly runs, including the command:
influx -database telegraf -execute “select RTT from mqtt_consumer where RTT>10000”
Since today, this now gives me an error:
Error: unknown shorthand flag: ‘d’ in -database
See ‘influx -h’ for help
The command “influx -h” gives me no clue how I should now be using or expressing the -database and -execute options.
apt-cache policy tells me that I’m now running…
Antony.
@Pooh You are a lifesaver! Uninstalling and reinstalling has put 1.8.3 back on and my Grafana instance is now back in service - thank you!
influxdb now put on hold in terms of automatic updates/manual updates!
1 Like
@cphillips , great you were able to get to state it is again working for you!
In case you would like to upgrade to v2 in the future, as InfluxDB runs as a service under the user influxdb
, it is best to run upgrade as the user influxdb
@VlastaHajek Yes, it’s a relief to have it back up and running!
I am going to make a clone of the VM which runs the InfluxDB and try the upgrade as the Influx user.