[package]
name = "disk-snapshot"
# 0.1.0 (2026-09-28): written for holger's admin view (owner 2026-09-28: "holger
# should have the same idea as gunnar's admin mode … disk usage, every disk and
# volume"). Product-neutral from the first line, so it lives here (RULE 2) and
# gunnar can adopt it: nothing in it names a product, a port or a role.
# 0.1.1 (2026-09-28): `speed` — the disk speed test (seq write, O_DIRECT read,
# 4 KiB fsync), moved AS IS out of gunnar-server disktest.rs (gunnar-live
# 50c3e69) for holger's admin view; additive.
version = "0.1.1"
edition = "2021"
rust-version = "1.85"
description = "What an appliance's disks hold, read the cheap way: every storage mount (/proc/self/mounts, pseudo filesystems left out), one statvfs(3) per mount (total / free / available / used / root-reserved / inodes), the disk floor a seller must never sell (max of a percentage and a minimum), the labelled paths a product cares about (system, data, caches, storage) resolved onto the mount they sit on, and every block device from sysfs (size, rotational, removable, read-only, partitions, md holders). Parsers are pure over what was read; readers take their root so a test feeds a recorded tree."
license = "MIT OR Apache-2.0"
repository = "https://git.gunnar.rs/nordisk/edda"
keywords = ["statvfs", "disk", "mounts", "appliance", "sysfs"]
categories = ["os::linux-apis", "filesystem"]
exclude = ["/.nornir/"]
[lib]
name = "disk_snapshot"
path = "src/lib.rs"
[dependencies]
# statvfs(3) as safe Rust (no `unsafe`, no zeroed struct): the same choice
# holger's metering and appliance-grow made.
rustix = { version = "1", default-features = false, features = ["std", "fs"] }
[dev-dependencies]
tempfile = "3"