threefoldtech / 0-db-fs

Apache License 2.0
2 stars 1 forks source link

cache: support read-only filesystem and read-only namespace #30

Open maxux opened 2 years ago

maxux commented 2 years ago

Adding -o ro works out-of-box by kernel/fuse and the filesystem is mounted in read-only mode, which works fine. In order to ensure the filesystem is in read-only mode, we can force zdb namespace to be in read-only as well (with a password protection).

When namespace are in read-only mode, cache fails to update backend because of the read-only namespace, which is normal but this should not happen when filesystem is mounted in read-only mode.

Disabling cache works (-o nocache) since this disable the full cache support but this is not ideal.