mongoose-os-docs icon indicating copy to clipboard operation
mongoose-os-docs copied to clipboard

Incorrect Filesystem Docs

Open tripflex opened this issue 6 years ago • 2 comments

https://github.com/cesanta/mongoose-os-docs/blob/master/mongoose-os/howtos/fs.md

Is now incorrect, as "apparently" sys.mount is deprecated (which to cesanta means removed):

https://github.com/cesanta/mongoose-os/issues/501

tripflex avatar May 02 '19 00:05 tripflex

I also met this issue - my intention was to create an additional filesystem to keep data for http server I overcame it with a modification to the mos.yml file which created & mounted filesystem:

  - ["fstab.fs1.dev", "sfl0"]
  - ["fstab.fs1.type", "SPIFFS"]
  - ["fstab.fs1.opts", '{"addr":3145728, "size" : 524288, "bs": 4096, "ps": 128, "es": 4096}']
  - ["fstab.fs1.path", "/http"]
  - ["fstab.fs1.create", true]

I am using ESP8266 With an update fw I am able to put new files to /http partition with mos put However after fw update I saw below log messages:

[Jul 27 12:21:59.174] mgos_vfs.c:100          Create SPIFFS (dev 0x3fff01ac, opts {"addr":3145728, "size" : 524288, "bs": 4096, "ps": 128, "es": 4096})
[Jul 27 12:21:59.189] mgos_vfs_fs_spiffs.:155 addr 0x300000 size 524288 bs 4096 ps 128 es 4096 nfd 10 encr 0 => -10025
[Jul 27 12:22:04.482] mgos_vfs.c:147          /http: SPIFFS @ sfl0, opts {"addr":3145728, "size" : 524288, "bs": 4096, "ps": 128, "es": 4096}
[Jul 27 12:22:05.047] mgos_vfs.c:320          /http: size 480561, used: 0, free: 480561
[Jul 27 12:22:05.180] mgos_sys_config.c:174   Saved to conf9.json

The error code 10025 makes me uncomfortable even if I could use this partition Would like to get updated manual)

grand87 avatar Jul 27 '19 19:07 grand87

Perhaps you should look if your starting address is correct, because in the example "addr is the offset from the beginning of the flash chip where to create the filesystem, 3145728 is just after the first 3M." Perhaps on your board this won't work. A little advice: please pose such questions in the developer forum, github is no discussion board.

mamuesp avatar Jul 28 '19 08:07 mamuesp