Back to projects

gzfs

A Go library for interacting with ZFS and ZPool on FreeBSD

See Repository

gzfs is a Go library that wraps the zfs, zpool, and zdb command line tools behind a typed API. It covers the common dataset and volume operations, pool creation and scrubbing, and low level pool inspection, and it parses the JSON output of the underlying commands instead of scraping text.

The library supports configurable command runners, so commands can run through sudo or a custom binary, and it ships with a mock runner and test suite for development. It targets OpenZFS 2.3.0 or newer and is used as the storage layer for Sylve.