Skip to main content

nessie-backend-zfs

The ZFS-backed storage backend for nessie-store — the VolumeBackend ⊂ SnapshotBackend ⊂ CloneBackend stack mapped onto zfs/zpool/exportfs. Volumes are datasets, snapshots are zfs snapshot, FlexClones are zfs clone, and the data plane is an NFS export. Every command goes through a CommandRunner seam, so it is exact and testable.

Install

pip install nessie-backend-zfs      # Python
cargo add nessie-backend-zfs        # Rust

Usage (Python)

Two extension points. Outside — drive real ZFS (needs zfs/zpool + privilege):

from nessie_backend_zfs import ZfsBackend

b = ZfsBackend(pool="ontap-sim", data_lif="192.168.1.100")
vol = b.create_volume("build-cache", size_bytes=10 * 2**30)
snap = b.create_snapshot(vol["uuid"], "pre-build")
clone = b.create_clone(vol["uuid"], snap["uuid"], "build-cache-pr1234")
print(b.access_handle(vol["uuid"]))   # {'kind': 'nfs_export', 'server': ..., 'path': ...}

Inside — pass a runner(argv) -> {"success", "stdout", "stderr"} callable and every command is routed through your function. Mock it for tests, audit it, or wrap it in sudo:

from nessie_backend_zfs import ZfsBackend

def runner(argv):
    print("nessie ran:", " ".join(argv))      # audit every command
    return {"success": True, "stdout": "", "stderr": ""}

b = ZfsBackend(pool="tank", runner=runner)
vol = b.create_volume("vol1", size_bytes=1 << 30)   # prints: nessie ran: zfs create -o quota=...

Methods return plain dicts in the substrate-neutral domain shape and raise NessieError on failure.

Usage (Rust)

use nessie_backend_core::{VolumeBackend, VolumeSpec};
use nessie_backend_zfs::{SystemRunner, ZfsBackend, ZfsConfig};

let cfg = ZfsConfig { pool: "ontap-sim".into(), ..ZfsConfig::default() };
let b = ZfsBackend::new(SystemRunner, cfg);
let vol = b.create_volume(VolumeSpec::named("build-cache")).unwrap();

The CommandRunner trait is the same seam the Python runner rides on — swap SystemRunner for a mock to assert the exact argv in unit tests.

Dual-licensed MIT OR Apache-2.0.

Metadata

Release files for nessie-backend-zfs 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for nessie-backend-zfs 0.3.1
File
nessie_backend_zfs-0.3.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
nessie_backend_zfs-0.3.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
nessie_backend_zfs-0.3.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
nessie_backend_zfs-0.3.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.10 abi3 macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 Details

Total release size: 1.7 MB

Release files / nessie_backend_zfs-0.3.1-cp310-abi3-win_amd64.whl

Download URL nessie_backend_zfs-0.3.1-cp310-abi3-win_amd64.whl
Size 262.4 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
7c5397a58a9467bc7d61bd5ca1d694632111d1e34a35bc4300496575cac1bffe
BLAKE2b-256 checksum
How to use checksums
444531ddf7afddab90bf170b6e50056aef02094a37efe80162c1abefa1db92fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / nessie_backend_zfs-0.3.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL nessie_backend_zfs-0.3.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 374.2 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
944c5c256065aa51b86e0c3a0d3a7a32060a4df043e437c4d4124f8a1960b6a5
BLAKE2b-256 checksum
How to use checksums
16067a99d023fd4c5e6e3858c17a6e49623bdd25db05a80a0c111086585ea6d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / nessie_backend_zfs-0.3.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL nessie_backend_zfs-0.3.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 366.6 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
79365da5615ba81cff0dc4c50dd300210503064c8a157bdf46c1db0dcf2c9487
BLAKE2b-256 checksum
How to use checksums
0a817d6706e3e2d30514d70e4c465fc3c3f62c2d1ba895d60a2ae53bb0d2bc82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / nessie_backend_zfs-0.3.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL nessie_backend_zfs-0.3.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 667.2 kB
Tags CPython 3.10 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
839070ca6cc4a56f0fb85ea46139bca29f197426b16aafea3b3e3e2ca09fc943
BLAKE2b-256 checksum
How to use checksums
e0e468abcf599eee3ca87ef5a8b1a7dd8f3d95a17b705eb5516362108cc58a23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.3.1 This release

4 release files

0.3.0

4 release files

0.2.1

4 release files

0.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page