Inspecting State
Once a volume is serving, most days need nothing. When you do want to look, flexblock show and a handful of metrics answer most questions.
flexblock show
Section titled “flexblock show”show prints the device, volume, ownership and connection state. It takes no lock, so it is safe to run against a live daemon. Figures it reads from a device a daemon is serving are labeled as estimates.
sudo flexblock show /dev/nvme1n1p1sudo flexblock show /dev/nvme1n1p1 --remote -vsudo flexblock show --remote --json| Flag | What it adds |
|---|---|
--json | Machine-readable output on stdout. |
--remote | The volume superblock and ownership marker, fetched from object storage. |
-v, --verbose | On-disk layout detail: region offsets, WAL head and generation. Needs a device. |
The device argument is optional when --remote is given, which lets you look at a volume from a host that has no cache device for it.
show needs only read access to the cache device. It also reports the PID of the daemon serving the device, which is how you find the right process to signal when a host serves more than one volume.
A quick look at the metrics
Section titled “A quick look at the metrics”With metrics enabled (start --metrics-port), a few series cover most questions: how much data is waiting to be uploaded, how old the oldest unflushed write is, how well the cache is hitting, whether object storage is returning errors, and the license state.
curl -s http://localhost:10056/metrics | grep -E '^flexblock_(cache_dirty_slots|cache_hits_total|cache_misses_total|cache_oldest_dirty_age_seconds|license_state|obj_errors_total) '