Doloops / mcachefs

mcachefs : Simple filesystem-based file cache based on fuse
64 stars 15 forks source link

Won't start: "invalid number of arguments" #2

Closed skerit closed 8 years ago

skerit commented 8 years ago

This is my config file:

/media/acd_cache/backing        /mnt/oldhome/acd_cache
/media/acd_cache/target         /media/acd
/media/acd_cache/metafile       /tmp/acd.metafile.mcachefs
/media/acd_cache/journal        /tmp/acd.journal.mcachefs
/media/acd_cache/verbose        99

But mounting it just gives me an error:

mcachefs 0.6.0 starting up...
ERR|7f4429509700|151220:192009:815|mcachefs-config.c:62:mcachefs_parse_config|Invalid number of arguments !
stapelberg commented 8 years ago

mcachefs requires 3 arguments (the first one is the name of the binary) as per https://github.com/Doloops/mcachefs/blob/master/src/mcachefs-config.c#L60

I think this is a bug. The README.md specifically contains mcachefs /mnt/target as command, which also has just 2 arguments, not 3.

Doloops commented 8 years ago

Hi,

Sorry for the delay of this answer ! I'll try and have a closer look at open issues now. The fact is, I switched from configuration file to command-line only argument passing somewhere in the past. And the README.md is plain wrong.

So the two required minimum arguments are the source dir and the target dir Let's say you want to mirror dir /media/input to /media/output, just call mcachefs /media/input /media/output

Extra fuse-like arguments are : cache the directory where cached files are stored metafile the absolute path to store the metadata file (dir structure, file names, ...) in cache journal the absolute path to the journal file verbose the level of verbosity (integer) 0 enables log, -1 disables it

I hope that helps,