Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: EROFS: read-only file system, mkdir '//.mc/' #173

Open
nehemiascr opened this issue Jan 2, 2023 · 2 comments
Open

Error: EROFS: read-only file system, mkdir '//.mc/' #173

nehemiascr opened this issue Jan 2, 2023 · 2 comments

Comments

@nehemiascr
Copy link

Describe the bug
I am trying to configure MindConnect Node-RED Agent v3.12.1 node installed in Node-RED v2.2.3 on IOT2050 Debian Example Image build V01.03.01
In this build of the IOT2050 Image, the filesystem of / is a read-only filesystem of type squashfs

root@iot2050-debian:/home/root# df -Th
Filesystem             Type      Size  Used Avail Use% Mounted on
udev                   devtmpfs  952M     0  952M   0% /dev
tmpfs                  tmpfs     500M  1.6M  499M   1% /run
/dev/mmcblk0p4         squashfs  911M  911M     0 100% /
/dev/disk/by-label/var ext4      638M  369M  223M  63% /var
overlay                overlay   638M  369M  223M  63% /etc
tmpfs                  tmpfs     967M     0  967M   0% /dev/shm
tmpfs                  tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs                  tmpfs     500M  4.0K  500M   1% /tmp
/dev/mmcblk0p7         ext4       21G  137M   19G   1% /home
tmpfs                  tmpfs     194M  8.0K  194M   1% /run/user/108
tmpfs                  tmpfs     194M  4.0K  194M   1% /run/user/0

This is causing the error
Error: EROFS: read-only file system, mkdir '//.mc/'
mindconnect-EROFS-error

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Mindconnect node, paste your onboarding configuration from Mindsphere
  2. Deploy
  3. See error

Expected behavior
Mindconnect onboarding should succeed

Desktop (please complete the following information):

  • OS: IOT2050 Debian Example Image build V01.03.01
  • Browser Any
  • Version MindConnect Node-RED Agent v3.12.1

** MindSphere Plan **

  • iot value plan
@nehemiascr
Copy link
Author

nehemiascr commented Jan 2, 2023

As a workaround from this comment #150 (comment), I was able to change the default location to a writable folder
from
basePath: string | IConfigurationStorage = process.cwd() + "/.mc/"
to
basePath: string | IConfigurationStorage = "/home/root/.mc/"

@fmoessbauer
Copy link

fmoessbauer commented Jan 4, 2023

All library data / state has to be stored in userDir, but not in the CWD: https://nodered.org/docs/user-guide/runtime/configuration

In general, state has to be stored either in /var or in /home/<user>. When starting node-red without arguments, the userDir points to $HOME/.node-red, which is a valid directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants