cetrafs
ReferenceInformation-oriented

/proc/fs/cetrafs

The files and fields 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
inforoot onlyLive state, space and counters
propertieseveryoneStatic format and device properties
clusterroot onlyEvery registered node and its liveness
controlsroot writesPer-mount settings and operator actions

Writing to controls needs CAP_SYS_ADMIN, whatever the file’s mode bits say.

info and cluster read the device on every read, which is why they are root-only: an unprivileged loop polling them would put steady load on the SAN. 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

info prints many more counters than this page lists. Most of them exist so the test suites can count operations; the ones below are those worth reading on a live system.

State

FieldMeaning
this_node_idThis node’s row 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 mount has stopped, for any cause; every access fails with EIO until remount
stoppedWhy it stopped: none, fenced, lease, error, corruption, manual or device_gone. See What a stopped mount does.
corruptionsDamaged metadata this mount has found. Above 0, the volume needs fsck.cetra.
fsck_neededno, or since <unix time> by row <N>: a node found damaged metadata and recorded it in the superblock. Cleared by a clean fsck.cetra -r.
sb_copyok, stale or bad: the copy of block 0 at block 2048, as found at mount. stale or bad means fsck.cetra -r should rewrite it at the next maintenance window.
volume_uuidThe volume’s UUID, the same on every node. Also reported as the filesystem UUID and in statfs’s f_fsid.
max_file_size_bytesThe largest file the format allows: 1 EiB

Geometry and space

FieldMeaning
block_sizeAlways 4096
total_blocksVolume size in blocks
zone_group_count, block_group_count, bg_size_blocksPartitioning
layout_genThe volume’s layout generation, raised by every grow. The same on every node a heartbeat after a grow.
inodes_count, free_inodesInode capacity and live free count
total_data_blocks, free_data_blocksData capacity and free blocks on the whole volume
free_data_blocks_owned, free_data_blocks_unowned_bgsFree blocks in the Block Groups this node owns, and in those nobody owns. Their sum is what this node can allocate: a node never takes space back from a live peer. Watch these per node.
zg N: owner=… block_groups=… free_data_blocks=…One line per Zone Group. owner is a row, none, or marked (this node).

Free counts for Zone Groups that other nodes own are refreshed at most every bg_sweep_min_secs (30 s by default), so polling this file doesn’t discard the allocator’s cache.

Coordination

These counters cover the whole module, not one mount.

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 really contending.
pending_free_appendsFrees this node queued into another node’s Zone Group
pf_drop_runs, pf_drop_blocksFrees dropped because the owner’s queue was full, and the blocks they held. The blocks stay allocated until the scrubber reclaims them. Should stay at 0.
bg_recountsBlock Group free counts recomputed because the cached count claimed space the bitmap didn’t have. Expected to stay at 0.

Integrity

FieldMeaning
bmap_crc_badBitmap sectors that failed their checksum. The node neither allocates from nor frees into such a sector; fsck.cetra -r rewrites it.
alloc_damaged_skipsAllocations that skipped a Block Group whose descriptor is damaged
tree_half_fullFiles that have passed half their extent tree’s capacity. The kernel log names each one; copying the file lays it out again in long extents.

Journal

FieldMeaning
journal_writesJournaled block writes
journal_slots_stuckJournal slots held by entries kept after a failed write. Nonzero means the device refused writes.
journal_replaysJournal areas this node replayed
journal_replay_appliedEntries replayed: interrupted writes completed
journal_replay_tornOf those, entries whose target was torn by the crash and repaired by the replay
journal_replay_skippedEntries skipped because the write had already landed, or the target was a new block
journal_replay_refusedEntries refused because the block had since been rewritten. Each one is a cross-node overwrite that was prevented.
journal_replay_keptEntries held back because a live node has the file open for writing. The file can’t be opened elsewhere until they settle.

Scrubber

FieldMeaning
scrub_cyclesScrub cycles completed
scrub_reclaimedLeaked data blocks reclaimed
scrub_orphan_inodes_reclaimedOrphaned inodes reclaimed
scrub_inflight_skipsCycles that freed nothing because a node had frees in flight (a truncate, hole punch, defragmentation step or xattr removal)
scrub_dead_journal_keptBlocks the scrubber left alone because a dead node’s unsettled journal may still name them
scrub_last_run_unix, scrub_last_run_msWhen the last cycle started, and how long it took

Discard and space

FieldMeaning
discard_cmds, discard_blocksUNMAP commands sent, and the blocks they covered
discard_handback_bgsEmptied Block Groups unmapped as they went back to the pool
discard_pending_bgsBlock Groups held out of use because their UNMAP’s outcome is unknown. See Return free space to a thin LUN.
discard_errorsUNMAPs the device refused. The blocks are freed anyway.
trim_leaked_blocksBlocks held back because an fstrim UNMAP failed in a way that may still execute. The scrubber returns them after trim_quarantine_secs.
trim_quarantinedBlocks currently in that quarantine
trim_held_zone_groupsZone Groups this node took over and keeps from the scrubber for the quarantine, because the previous owner’s hold was lost with it
inline_discard_queued, inline_discard_cmds, inline_discard_blocks, inline_discard_droppedThe -o discard queue: runs queued, commands and blocks sent, and runs dropped because the queue was full. fstrim still finds dropped space.
space_waitsOverwrites that waited because the array had no space for them: a full thin pool, or a snapshot’s copy-on-write
close_space_waitsLast closes that waited for space to write what they still held
held_refusalsMetadata blocks a flush couldn’t write for lack of space, kept for the next flush

Performance

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.
dio_fallbacks, dio_convertsO_DIRECT writes that went through the page cache instead (should stay at 0), and direct writes that converted preallocated blocks
map_calls, map_blocksBlock mapping calls against the blocks they covered. blocks much larger than calls means mappings come back as contiguous runs.
ext_cache_hits, ext_cache_missesLookups answered by the extents each file remembers, against those that walked the tree. On a sequential write hits should far outnumber misses.
dio_hole_runs, dio_hole_run_blocksDirect writes into a hole that mapped several blocks at once, and the blocks they mapped
hole_cache_hitsReads of a hole answered from a remembered hole instead of a tree walk
tree_blocks, tree_readsExternal extent-tree blocks written, and read during lookups
zero_inplace_blocksBlocks ZERO_RANGE zeroed in place with WRITE ZEROES
file_cache_drops, file_cache_reconcilesTimes this node dropped a file’s cached tree because a peer changed the file, and the reconciles that followed. drops running ahead of reconciles means files are stuck on the slow, uncached path.
lock_suspends, lock_resumesFiles whose lock this node suspended with flock(LOCK_UN) on a default mount, and took back with flock(LOCK_EX)
defrag_passes, defrag_yieldsDefragmentation passes, and passes that stepped aside for an open or a peer

properties

FieldMeaning
versionOn-disk format version (0x000a)
block_sizeBlock size
kernel_page_size, blocks_per_pageThe kernel’s page size and how many filesystem blocks fit in a page. A mount needs 4096 and 1.
test_paramslocked for a packaged build, which refuses every test-only parameter; settable for a developer build
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=1795140000 label=pve2 caps=0x1 stale_secs=120 departure=none stale=no incarnation=2841992710 (this node)
live_grow_ready: yes
FieldMeaning
stateREGISTERED. A row held by growfs.cetra or an offline fsck.cetra -r is printed as row=N REPAIR-IN-PROGRESS last_seen=… label=… instead; it is why mounts are being refused.
uuidThe node’s stable machine UUID
hb_seqHeartbeat counter. Liveness is judged by watching it move, never by comparing clocks.
last_seenUnix time of the last heartbeat, informational
labelHostname, informational
capsCapabilities the node’s module advertised. 0x1 is live grow.
stale_secsThat node’s own stale window
departurenone (mounted, or crashed with no verdict yet), clean (it unmounted and said so) or dead (a peer fenced it, or an HA agent declared it dead)
staleWhether this node considers that peer dead
incarnationWhich mount of that node the row belongs to, drawn afresh at every mount. Needed by the dead= and retire_journal= controls.

After the node lines, live_grow_ready: yes|no says whether every registered node advertises the live-grow capability.

controls

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

Settings

KeyValuesDefaultEffect
defragon, offonAllow defragmentation at all on this mount, including defrag.cetra
auto_defragon, offmodule auto_defragThe background defragmenter
defrag_availableread-onlyWhether defragmentation can run on this mount: no under nofilelock
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
handback_grace30–1800150, or module handback_grace_secsSeconds a Zone Group this node claimed or allocated in keeps its empty Block Groups before handing them back. Read back as handback_grace_secs. Space only: no effect on safety.
discardon, offon, or off with nodiscardUNMAP an emptied Block Group as it goes back to the pool, and allow fstrim
inline_discardon, offoff, or on with -o discardUNMAP freed space as it is freed. Needs discard on too.
discard_supportedread-onlyWhether the device takes discards at all
shutdownread: yes, noWhether this mount has stopped

Timing is per node. Each node advertises its own heartbeat rate and stale window, and its peers judge it by those, so the values don’t have to match across the cluster.

Actions

dead=, retire_journal= and release_discards= need CAP_SYS_ADMIN.

KeyEffect
shutdown=nowStops the mount at once, as a crash would. See Stopping a mount by hand.
dead=<row>:<incarnation>Declares a peer that has been powered off dead, so its files can be taken over at once instead of after the stale window. Takes up to three of that host’s heartbeats plus 5 s, and refuses a row that is still beating. See Declare a fenced host dead.
retire_journal=<row>:<incarnation>Gives up a dead node’s journal entries that can’t be replayed, after replaying everything that can be. Only for a host that will never mount again. See A dead node’s journal that won’t settle.
release_discards=nowReleases the Block Groups held for an UNMAP of unknown outcome, untrimmed. Only once no earlier UNMAP can still land. See Return free space to a thin LUN.

Last updated