view README.md @ 1305:e74729772b75 draft default tip

objstore: add a per-page lock Aside from just adding the lock to the structure, this commit also adds the appropriate page_{lock,unlock} calls to the cache code and replaces an open-coded free with a call to free_page. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Thu, 01 Feb 2024 11:57:28 -0500
parents b0ecf5a49e0c
children
line wrap: on
line source

Nomad is a distributed file system supporting disconnected operation.

The current goals include:
* architecture and OS agnostic code
* client-server architecture
* untrusted client
* disconnected operation
* support for special files (named pipes, symlinks, etc.)
* Unix-style file permissions
* multi-user capable server

Once these are done, we will reevaluate the next set of goals.


Building and Installing
=======================

First, you need to get the code itself.  Since Nomad is under heavy
development, there are no releases yet.  So, for now you have to clone it
using Mercurial:

```sh
$ hg clone http://hg.31bits.net/nomad/
```

Now that you have all the necessary code, you can build it.

```sh
$ cmake -DCMAKE_INSTALL_PREFIX=/prefix .
$ make
$ make install
```

This will build and install the binaries and libraries under the specified
prefix.

You can also define the following cmake variables to help it find libjeffpc.

	WITH_JEFFPC_LIB=<directory containing libjeffpc.so>
	WITH_JEFFPC_INCLUDES=<directory containing jeffpc/jeffpc.h>

Setting `WITH_JEFFPC` to `/path` yields the same effect as setting both:

	WITH_JEFFPC_LIB=/path/lib
	WITH_JEFFPC_INCLUDES=/path/include

For example:

```sh
$ cmake -DCMAKE_INSTALL_PREFIX=/prefix -DWITH_JEFFPC=/opt/jeffpc .
```


Running
=======

First you need to create a config file.  For an example along with a
description of the syntax refer to `examples/nomad.conf`.

Either place the config file at `/etc/nomad.conf` or set the `NOMAD_CONFIG`
environment variable to the config file's location.  All nomad executables
that require a config file check the environment variable, and if not set
they fall back to the hardcoded `/etc/nomad.conf`.

For example:

```sh
$ export NOMAD_CONFIG=/some/where/nomad.conf
$ nomadadm host-id
0xabcdefab
```

First, start the client daemon (`nomad-client`).  It will start listening on
a TCP/IP socket:

```sh
$ nomad-client
```

Then, use `nomadadm` to create a vdev and a volume on that vdev.  For
example:

```sh
$ nomadadm vdev-create -t posix /path/to/data/dir
$ nomadadm vol-create $vdev_uuid_from_previous_command
```

Finally, you can mount the freshly created volume:

```sh
# VOL=$vol_uuid_from_nomadadm \
	nomadfs -o allow_other -o default_permissions /mnt/nomad
```

Internal Dependencies
=====================

```text
             | common | objstore 
-------------+--------+----------
common       |   -    |    n     
objstore     |   n    |    -     
objs. module |   ?    |    n     
client       |   y    |    y     
server       |   n    |    n     
tool         |   n    |    n     

  y = yes, linked against
  n = no, not linked against
  - = not applicable
  ? = may be linked against as necessary
```