Hi folks, I’m using the -d option to set the client data store directory but it doesn’t seem to be working as I expected (or as I need it to).
I’m running the client as:
/usr/bin/mender -d /userdata/temp daemon
and then expecting data files to be written to /userdata/temp. However, on starting up the client I see the following in these 2 different locations:
/ # ls -al /var/lib/mender
drwx------ 2 root root 1024 Apr 27 20:23 .
drwxr-xr-x 7 root root 1024 Apr 27 18:48 ..
-rw------- 1 root root 8192 Apr 27 20:23 mender-store
-rw------- 1 root root 8192 Apr 27 20:24 mender-store-lock
/ # ls -al /userdata/temp
drwx------ 2 root root 1024 Apr 27 20:23 .
drwxr-xr-x 7 root root 1024 Apr 27 18:48 ..
-rw------- 1 root root 12288 Apr 27 20:23 mender-store
-rw------- 1 root root 8192 Apr 27 20:24 mender-store-lock
After doing a test single-file update then I see the following in these directories:
/ # ls -al /var/lib/mender
drwx------ 4 root root 1024 Apr 27 20:29 .
drwxr-xr-x 8 root root 1024 Apr 27 20:29 ..
-rw------- 1 root root 8192 Apr 27 20:23 mender-store
-rw------- 1 root root 8192 Apr 27 20:29 mender-store-lock
drwx------ 3 root root 1024 Apr 27 20:29 modules
drwxr-xr-x 2 root root 1024 Apr 27 20:29 scripts
/ # ls -al /userdata/temp
drwx------ 2 root root 1024 Apr 27 20:29 .
drwxr-xr-x 8 root root 1024 Apr 27 20:29 ..
-rw------- 1 root root 1508 Apr 27 20:29 deployments.0001.6769bb70-b614-4844-a684-39ba1177aca4.log
-rw------- 1 root root 32768 Apr 27 20:29 mender-store
-rw------- 1 root root 8192 Apr 27 20:29 mender-store-lock
So, at startup it seems to write to mender-store
and mender-store-lock
in both directories.
During the update process it seems to write to mender-store-lock
in both directories but only mender-store
in the overridden -d directory.
It writes the deployments log file to the overridden -d directory.
It writes the artifact scripts to the scripts sub dir in the default directory.
It writes the downloaded payload to the modules sub dir in the default directory.
This is significant as the location for the downloaded payload has to be in an area which is large enough to hold it, therefore it must be possible to control where that location is otherwise the download will fail.
Can anyone shed any light on this?
Many thanks,
Grant