cetrafs
ReferenceInformation-oriented

/proc/fs/cetrafs

Every file and field cetrafs publishes under /proc/fs/cetrafs/<dev>/: info, properties, cluster and the writable controls.

Each mounted volume gets a directory /proc/fs/cetrafs/<dev>/, where <dev> is the kernel’s name for the device (sdb, loop0, dm-3…). It is created at mount and removed at unmount.

FileModeContents
inforead-onlyLive topology, state and counters
propertiesread-onlyStatic format and device properties
clusterread-onlyEvery registered node and its liveness
controlsread-writePer-mount tunables

Reading the read-only files is safe on a live mount. info stays readable even if the device has gone away: fields that can be answered from memory are still printed, and the others read unavailable (<errno>).

info

State

FieldMeaning
this_node_idThis node’s row index in the Node Registry
write_readyyes if this node owns at least one Zone Group and can allocate. no is normal while every Zone Group is owned by live peers.
file_lockon or off: the cluster-wide file-lock mode in effect (off = nofilelock)
fencedyes if this node has fenced itself; every write fails with EIO until remount
max_file_size_bytesThe maximum file size the kernel enforces on this volume: the smaller of the volume capacity and 16 TiB

Geometry and space

FieldMeaning
block_sizeAlways 4096
total_blocksDevice size in blocks
zone_group_count, block_group_count, bg_size_blocksPartitioning
inodes_count, free_inodesInode capacity and live free count
total_data_blocks, free_data_blocksData capacity and free count
zg N: owner=… first_bg=… bg_count=… free_data_blocks=…One line per Zone Group. owner is a row index, none, or marked (this node).

Free counts for Zone Groups that other nodes own are refreshed at most once every bg_sweep_min_secs (30 s by default), so polling this file doesn’t discard the allocator’s cache. They can be up to that many seconds old.

Coordination counters

These counters cover the whole module, not one mount: they include every volume this host has mounted.

FieldMeaning
cas_opsCompare-and-writes issued
cas_miscomparesCompare-and-writes the device rejected because the record had changed: real cross-node contention, each one retried. Stuck at 0 while several nodes are busy means they aren’t actually contending.
record_writesFull-record writes
pending_free_appendsFrees this node queued into another node’s Zone Group
pf_drainsPending-free queue drains performed
foreign_free_leaksExtents not freed because the owning node’s pending-free queue was full. The space is leaked on purpose and later reclaimed by the scrubber or fsck -r; the caller never sees an error.
zg_pending_deltasZone Groups with free-count changes held in memory, not yet written to disk (this mount)

Journal

FieldMeaning
journal_writesJournaled block writes
journal_replaysJournal areas this node replayed
journal_replay_declinesContested replay claims this node gave up to a peer
journal_replay_appliedEntries replayed: interrupted writes completed
journal_replay_skippedEntries skipped because the write had already landed, or the target was a freshly allocated block
journal_replay_refusedEntries refused because another node had since rewritten the target block. Each one is a cross-node overwrite that was prevented. Expect a burst after a failover under nofilelock and zero otherwise.

Scrubber

FieldMeaning
scrub_cyclesScrub cycles completed
scrub_reclaimedLeaked data blocks reclaimed
scrub_orphan_inodes_reclaimedOrphaned inodes reclaimed
scrub_last_run_unix, scrub_last_run_msWhen the last cycle started, and how long it took

Performance diagnostics

FieldWhat to look for
bg_pick_cursor, bg_pick_scanAllocation-cursor hits against full scans. scan rising in step with cursor means each block allocation is scanning again.
bg_desc_kept, bg_desc_refreshedDescriptor sweeps that kept this node’s cached Block Group descriptors, against those that forced them back to the device. kept should rise on a node that owns Zone Groups.
bg_geom_readsBlock Group geometry reads
map_calls, map_blocksBlock mapping calls against the blocks they covered. blocks much larger than calls means mappings come back as contiguous runs.
giveback_blocksPreallocated blocks released because an extent split had no room. A last resort that should stay at or near zero.
tree_blocksExternal extent-tree blocks (leaf or interior) written. Nonzero means some file outgrew its four inline extent slots.
file_cache_drops, file_cache_reconcilesTimes this node dropped a file’s cached extent tree and pages because a peer had republished the file, and the reconciles that followed. Drops should be about 0 on a node writing its own files, and every drop should be followed by a reconcile; drops running ahead of reconciles means files are stuck on the slow, uncached path.

properties

FieldMeaning
versionOn-disk format version
block_sizeBlock size
cluster_idThe volume’s cluster identifier
features_compat, features_ro_compat, features_incompatFeature bitmaps; incompatible flags are also printed by name
caw: class=… logical_block_size=… max_caw_blocks=… available=…The device’s compare-and-write capability. class is scsi, nvme or none. available=no means the volume is single-node only.

cluster

One line per Node Registry row that isn’t free:

node 1: state=REGISTERED uuid=… hb_seq=4711 last_seen=1792540000 label=pve2 stale=no (this node)
FieldMeaning
stateREGISTERED
uuidThe node’s stable machine UUID
hb_seqHeartbeat counter, incremented every heartbeat
last_seenUnix time of the last heartbeat. A clean unmount backdates it so peers see the departure at once.
labelHostname, informational only
staleWhether this node considers that peer dead

controls (writable)

Write one key=value (or key value) per write. Reading the file prints the current values. An unparseable or out-of-range write changes nothing and logs a warning; a successful change is logged at info level. Values last for this mount only.

KeyValuesDefaultEffect
defragon, offonAllow defragmentation at all on this mount, including defrag.cetra
auto_defragon, offmodule auto_defragThe background defragmenter
hb_interval_secs5–3015Seconds between this node’s heartbeats
stale_secs15–240, and ≥ 3 × hb_interval_secs120How long a peer may be silent before this node treats it as dead

Timing is per node. Each node advertises its own heartbeat rate, and its peers give it at least four of those intervals, so the values don’t have to match across the cluster. The file-lock mode is set at mount, not here.

Last updated