/data/mender folder missing in standalone mode


I’m not sure whether we required /data/mender folder in standalone mode (specifically when using with a HTTPS server instead of USB location) but, this is missing when we disable the mender daemon.
The folder will again appear when we enable the mender daemon.

Hence, I would like to know whether this folder is required in standalone mode or not. I know this folder do not have any effect when we use USB location but, have doubt if we are using “mender -rootfs 'HTTPS location

I’m not completely sure about Mender 1.7.0 and lower, but for sure it will be required in Mender 2.0.0 and onwards, so my recommendation would be to treat it as required everywhere. This is true both for USB and HTTPS installs.

Thank you for the confirmation @kacf.
I have tested in Mender 1.7.0 and below are the observation:

  • /data/mender folder will be present by default in the filesystem when the mender daemon is running by default.
  • I have disabled the mender daemon using systemctl stop mender followed by systemctl disable mender commands. Then the /data/mender folder also will disappear in this case.
  • If I enable the mender daemon back using systemctl enable mender followed by systemctl start mender commands, then /data/mender folder will appear again.

This looks like mender service is controlling the /data/mender folder.

BTW, may I know, why this folder is required in the Mender 2.0.0 but not mandatory in 1.7.0?

It is created by the mender.service if it does not exist,

But it does not explain why it would disappear if you stop the service as there is nothing that would remove it in the mender.service file.

@mirzak Can you please confirm that you are getting the expected “/data/mender” folder even in standalone mode with Mender 1.7.0?

If it is coming by default in mender standalone, then there may be some issue with my build which I can look into.

In Mender 2.0.0, the currently installed artifact is stored in the local database in /data/mender (actually it’s /var/lib/mender, but it’s usually a symlink for dual rootfs configurations). Previously this was stored in a static file in /etc/mender/artifact_info, but this is not sufficient anymore with update module support.

1 Like