Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
246 changes: 246 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ libc = "0.2"
env_logger = "0.11"
log = "0.4"
serde_json = "1"
nfsserve = "0.11"
async-trait = "0.1"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
tracing-subscriber = "0.3"
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ as a directory containing a `metadata.json` file.
metadata.json
```

FUSE mounting and NFS serving are supported directly. The same ATLAS tree can also be materialized to a real directory when a static export is useful.

## Requirements

### Linux
Expand Down Expand Up @@ -48,13 +50,13 @@ mkdir -p data
cp /path/to/2024_11_18_ATLAS_info.tsv data/
```

## Run
## Run with FUSE

Build and mount the filesystem:

```bash
mkdir -p /tmp/atlas_mount
cargo run --release -- data/2024_11_18_ATLAS_info.tsv /tmp/atlas_mount
cargo run --release -- fuse data/2024_11_18_ATLAS_info.tsv /tmp/atlas_mount
```

Leave that command running while the filesystem is mounted.
Expand All @@ -81,3 +83,35 @@ macOS:
```bash
diskutil unmount /tmp/atlas_mount
```

## Materialize To Disk

Write the same ATLAS filesystem tree to a real directory:

```bash
rm -rf /tmp/atlas_export
cargo run --release -- materialize data/2024_11_18_ATLAS_info.tsv /tmp/atlas_export
ls /tmp/atlas_export/atlas | head
cat /tmp/atlas_export/atlas/1r6w_A/metadata.json
```

The `/tmp/atlas_export` directory can then be exported with the system NFS server.

## Run With NFS

Start the NFS server:

```bash
cargo run --release -- nfs data/2024_11_18_ATLAS_info.tsv 127.0.0.1:11111
```
In another terminal, mount it.

macOS:

```bash
mkdir -p /tmp/atlas_nfs
mount_nfs -o nolocks,vers=3,tcp,rsize=131072,actimeo=120,port=11111,mountport=11111 localhost:/ /tmp/atlas_nfs
ls /tmp/atlas_nfs/atlas | head
cat /tmp/atlas_nfs/atlas/1r6w_A/metadata.json
diskutil unmount /tmp/atlas_nfs
```
Loading