Change data directory

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 :slight_smile:

Thanks!

Is that 4tb device:

a) mounted read-only

b) not an EXTn file system?

Antony.

its mounted read / write.

Its an exfat filesystem.

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.

Iโ€™ll have to step back and let someone else respond regarding this, as Iโ€™ve
never used systemd for managing services.

Antony.