Couchbase installed in a readonly filesystem

We are using couchbase community version 6.5.1. We have it installed on a debian 8 environment at a location other than /opt/couchbase as this is our requirement. This filesystem is a readonly and couchbase do not seem to start as it cannot write logs or possibly few other files in that filesystem. I tried redirecting logs to a read write location by editing static_conficg file’s ‘error_logger_mf_dir’ parameter but it doesn’t seem to work. Are there more files than just logs being written when couchbase starts which are preventing it to start? It would be really helpful if I may know what all locations/files need to be moved to a read-write location.

Hi @ndubey:

I’m not sure if this is actually going to work - as this is a setup that we don’t see asked for at all and we don’t test for it. At a minimum you’d need to modify all of the following keys in static_config to point to writeable locations.

  • error_logger_mf_dir
  • path_config_etcdir
  • path_config_datadir
  • path_config_tmpdir
  • nodefile

You’ll also need to copy the OOTB content under the etc dir to your new writeable location. You’ll also need to heavily modify the script in /bin to similarly point to writable locations. I.e. all of these variables: DEFAULT_CONFIG_DIR, DEFAULT_CONFIG_FILE, LOCAL_CONFIG_DIR, LOCAL_CONFIG_FILE, PIDFILE, COOKIEFILE, NODEFILE, STATIC_CONFIG_PATH, CB_DATA_DIR, SSL_DIST_OPTFILE, CB_DIST_CFG_FILE, HOSTS_CFG_FILE. (And in addition the NODEFILE couchbase-server should be the same as that in static_config.)

Even with these changes it’s not guaranteed that things will work - Couchbase Server isn’t designed for this kind of use at this time - so I can’t promise success. But good luck!



Thank you Dave. I will try making those changes and will let you know how it goes.


@ndubey I am curious to know your use case and what you are trying to achieve.

@raju We have a custom Debian OS that installs all required software at location /usr/local/apps but this location is read-only. For other software we write logs at /var/logs. We were looking to have Couchbase work in a similar manner.