Hey Guys,
i am trying to change the data directory for my new set up InfluxDB.
I changed the Path on the InfluxDB.config to my preferences.
And tried
sudo chown influxdb:influxdb /media/4tb/influxdb/
but I get the following error
chown: changing ownership of β/media/4tb/influxdb/β: Operation not permitted
any help with that ?
im running on ubuntu 18.04 but I a linux noob 
Thanks!
Pooh
2
Is that 4tb device:
a) mounted read-only
b) not an EXTn file system?
Antony.
its mounted read / write.
Its an exfat filesystem.
Pooh
4
Thereβs your answer, then.
You canβt change the ownership on an exfat system.
The only way I can think to achieve what you want is to mount it as the
influxdb user, not as root (or anybody else).
Antony.
if you plan on using the drive exclusively with Linux systems then you can format the drive as an ext4 volume and try again
alright I try that thanks guys
I used ext4 and it works now but when I try to start the dbservice I get the following:
timo@fileserver:~$ sudo systemctl status influxdb
β influxdb.service - InfluxDB is an open-source, distributed, time series database
Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-07-15 11:02:52 UTC; 2s ago
Docs: https://docs.influxdata.com/influxdb/
Process: 1710 ExecStart=/usr/bin/influxd -config /etc/influxdb/influxdb.conf $INFLUXD_OPTS (code=exited, status=1/FAILURE)
Main PID: 1710 (code=exited, status=1/FAILURE)
Jul 15 11:02:52 fileserver systemd[1]: influxdb.service: Service hold-off time over, scheduling restart.
Jul 15 11:02:52 fileserver systemd[1]: influxdb.service: Scheduled restart job, restart counter is at 5.
Jul 15 11:02:52 fileserver systemd[1]: Stopped InfluxDB is an open-source, distributed, time series database.
Jul 15 11:02:52 fileserver systemd[1]: influxdb.service: Start request repeated too quickly.
Jul 15 11:02:52 fileserver systemd[1]: influxdb.service: Failed with result 'exit-code'.
Jul 15 11:02:52 fileserver systemd[1]: Failed to start InfluxDB is an open-source, distributed, time series database.
Pooh
8
Iβll have to step back and let someone else respond regarding this, as Iβve
never used systemd for managing services.
Antony.
marcelr
9
Hello,
Iβm currently using the configuration below, and I havenβt had any problems so far, I hope it helps you
My service lib/systemd/system/influxdb2.service
[Unit]
Description=INFLUXDB2
[Service]
Type=simple
ExecStart=/bin/bash /var/InfluxDB/run.sh
[Install]
WantedBy=multi-user.target
and inside the bash script (/var/InfluxDB/run.sh) I added the parameters that I need
/usr/local/bin/influxd --http-bind-address=:8086
β influxdb2.service - INFLUXDB2
Loaded: loaded (/lib/systemd/system/influxdb2.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2020-07-31 23:25:41 -03; 1 months 10 days ago
Main PID: 416225 (bash)
Tasks: 54 (limit: 4620)
Memory: 545.3M
CGroup: /system.slice/influxdb2.service
ββ416225 /bin/bash /var/InfluxDB/run.sh
ββ416236 /usr/local/bin/influxd --http-bind-address=:8086
1 Like