cetrafs
ReferenceInformation-oriented

Troubleshooting

Symptoms, error messages and counters, with what each one means and where to go next.

Errors from applications

SymptomMeaningNext step
Text file busy (ETXTBSY) opening a fileAnother live node has it open for writing (default mount), or holds it with flock. A file has one writer and nobody else, or readers and no writer.Expected. Close it on the other node.
Text file busy opening a file a crashed node had openThe dead node’s lock holds until the stale window passes (120 s by default)Wait, or declare the host dead once it is powered off
EAGAIN opening a file on a nofilelock mount after a node diedThe dead node’s journal for that file hasn’t been replayed yetThe same: wait for the stale window, or declare the host dead
Text file busy deleting, renaming over or truncating a fileAnother live node has the file openClose it there first
qemu: Could not open '…': Text file busy during live migrationThe cluster is mounted with the file lock onEnable live migration
qemu: Failed to lock byte …A stock qemu with image locking, on a default mount, where fcntl locks are refusedMount that node with localposixlocks, or run the cluster nofilelock. See fcntl locks.
ENOLCK from fcntlByte-range locks aren’t cluster-wide, so a default mount refuses themAs above
Every access fails with EIOThe mount has stoppedCheck fenced and stopped in info, then unmount and mount again. Details
Structure needs cleaning (EUCLEAN) writing a fileDamaged metadata was found in it. Writes to it are refused; reads of its undamaged parts still workCopy out what can be read, then run fsck.cetra -r offline. Details
ENOSPC on one node while df on another shows free spaceA node allocates only from Block Groups it owns or nobody owns, and never takes space from a live peerCompare free_data_blocks_owned and free_data_blocks_unowned_bgs in info on each node. Move the VM to a node with space, or grow the volume. See Limits.
ENOSPC writing one file, with the volume far from fullThe file’s extent tree is full: millions of small scattered first writesdmesg names the file. Copy it to lay it out again. See extents per file.
ENOSPC creating a file in one directoryThe directory has reached about 3.9 million entriesdmesg names the directory. Spread files across directories.
ENOSPC everywhereThe volume or its inodes are fullCheck free_data_blocks and free_inodes; grow the volume, with -N for inodes
Writes hang, processes in D state, has no space to overwrite … waiting for it in dmesgThe array’s thin pool is full, or a snapshot has no room for its copy-on-writeGive the pool space or delete a snapshot; the writes complete on their own. See When the array runs out of space.
EOPNOTSUPP from fallocateCOLLAPSE_RANGE or INSERT_RANGE; or preallocation on a file another node has openExpected; qemu and posix_fallocate fall back
EOPNOTSUPP from flockShared lock requested, or LOCK_EX on a default mount for a file this node doesn’t have open for writingUse LOCK_EX, on a descriptor opened for writing
EBADF from flockLOCK_EX and LOCK_UN need a descriptor open for writing, or CAP_SYS_ADMINOpen with exec 9>>, not 9<
EIO from flock -uThe release didn’t reach the device; the descriptor keeps the lockRetry flock -u
ETXTBSY writing a file after flock -u on a default mountThis node suspended its lock for a handoff; its own writes are refused until flock -x takes it backExpected: a handoff never has two writers
EWOULDBLOCK from flock -x -n on a default mountThe lock was suspended and another node has taken the file sinceExpected after a handoff. Wait, or let the peer close the file
EIO from closeA write of the file’s data failed earlier and nothing had reported itCheck the storage path; data written since the last successful fsync may not be on the device
EIO on one node for files with blocks in space another node just grew intoThis node’s device still has the old size. Nothing is marked damagedRescan the device on this node
A create, rename or delete in one directory waitsA node that died held that directory’s namespace lockIt goes ahead once the node is stale. If the holder is still alive, it fails with EBUSY after about 12 s.
EINVAL from renameRENAME_EXCHANGE or RENAME_WHITEOUTNot supported

Loading the module

SymptomMeaningNext step
modprobe: Key was rejected by serviceSecure Boot is enabled and the module’s signing key isn’t enrolled. Every DKMS-built module does thisEnroll the DKMS key on the node
insmod: Required key not available or Key was rejected by serviceSecure Boot and a module you built yourself, which isn’t signedSign it
unknown filesystem type 'cetrafs'The module isn’t installed for this kernel, or the kernel refused to load itdkms status cetrafs; install the headers for the running kernel. DKMS builds only for kernels 7.0 to 7.3. If it is installed, modprobe cetrafs shows why it won’t load
insmod: unknown symbol crc32cCRC32C is a separate module on this kernelmodprobe libcrc32c, or install the module and use modprobe

Mount failures

SymptomMeaningNext step
EBUSYThe device has no atomic CAW and another node already has it mountedSingle-node only. Check CAW.
EIO, dm path: /sys/block/… cannot be read in dmesgOn a multipath device, cetrafs couldn’t read /sys to find the SCSI path, so it can’t tell whether the LUN has atomic CAW. It refuses rather than mount single-nodeCheck that /sys is mounted and readable in PID 1’s root, then mount again
EBUSY, is being repaired right now in dmesgAn fsck.cetra -r or growfs.cetra is working on the volumeWait for it to finish. A claim left by a killed tool is reaped once it is no longer renewed.
EBUSY, another machine has the same node UUID in dmesgTwo machines share a DMI UUID, typically cloned VMsGive one its own identity: options cetrafs node_uuid=<uuid>. See the Node Registry.
Refused, node_uuid named in dmesgThe firmware’s DMI UUID is a placeholder, or there is no serial to tell machines apartSet node_uuid on that machine
Mount takes minutes, watching it … to be sure no other machine is using it in dmesgThe first mount after an unclean shutdown watches its old registry row for the stale window, and may wait for a peer replaying its journalExpected. If systemd kills the mount after 90 s, raise its mount timeout
Refused, block 0 doesn’t verifySomething overwrote the superblock: a partition tool, a label, a dd at the wrong diskRestore it from the copy
EBUSY, is already mounted without … in dmesgA second mount of a device this node already has mounted asks for a different nofilelock, errors= or corruption= settingUse the first mount’s options
EINVAL, version or feature in dmesgThe volume has another format version. 0.9.x volumes don’t mount on 0.10.Upgrade by reformatting
EINVAL, file-lock mode conflict in dmesgYour nofilelock option disagrees with the mode the cluster already usesUse the same options as the other nodes
“CAW discovery failed … refusing the mount”cetrafs couldn’t determine whether the device supports compare-and-writeCheck the storage path; the probe shows the error
Refused, page size in dmesgA kernel with 16 KiB or 64 KiB pagesUse a 4 KiB-page kernel
Mounted read-only unexpectedlyAn unknown read-only-compatible feature bitInstall the release that made the volume
Mounts, but write_ready: noEvery Zone Group is owned by a live peerPersistent means fewer Zone Groups than writing nodes; mkfs.cetra now defaults to one per node

Tools

SymptomMeaning
mkfs.cetra, growfs.cetra or fsck.cetra -r exits 3 naming the device as busyThe device is mounted on this machine, possibly in another mount namespace (a container). Unmount it there.
mkfs.cetra exits 3 naming a live peerAnother node still has the volume mounted. -f won’t override this.
fsck.cetra --live exits 3The volume changed too fast between walks to reach a verdict. Run it again when it is quieter.
fsck.cetra -r says a journal hasn’t been replayedMount the volume once, unmount it, and run -r again

Messages in fsck output

MessageMeaning
N data block(s) marked in use but referenced by no inode (leaked)Normal after a node crash: blocks reserved ahead of need. The scrubber reclaims them; -r does it at once.
WARN lines about a deleted record’s stale extents, a record never written, or an empty file no entry namesLeftovers of an interrupted operation, not damage; they don’t change the exit code
note: about a free count behind its bitmapA crashed owner’s count, recounted by the next mount that takes over the Zone Group
Cross-file overlap, unreadable inode, dangling entry-r refuses: these need a human decision. Keep the image, and report it.
A block referenced by a file but marked freeNever a crash leftover. Treat it as damage and report it.

Messages in the kernel log

MessageMeaning
fsck needed at mountA node found damaged metadata earlier. Run fsck.cetra --live, then fsck.cetra -r offline at the next window.
A warning that the superblock copy is stale or badThe copy at block 2048 is damaged; the volume works. Run fsck.cetra -r at the next window to rewrite it.
pending free LEAKA free couldn’t be queued because the owner’s queue was full. The scrubber reclaims the blocks.
A file passing half its extent tree’s capacitySee extents per file
retiring node N's entry …An operator retired a dead node’s journal; each entry given up is named

Counters worth a second look

Counter (in info)Concerning when
journal_replay_refusedIt rises with no recent failover. Find the block in dmesg.
cas_miscomparesIt stays at 0 while two nodes are both busy (they may not share the device)
scrub_reclaimed / scrub_cyclesLeaks keep growing across crashes and scrub_cycles doesn’t move
bmap_crc_badAny value above 0: a bitmap sector is damaged. Run fsck.cetra -r at the next window.
discard_pending_bgsStays above 0: UNMAPs with an unknown outcome. See Return free space to a thin LUN.
space_waitsRising: the array is out of space
file_cache_drops far above file_cache_reconcilesFiles are stuck re-reading metadata from the device; I/O will be slow

Performance

SymptomLikely cause
Guest much slower than the hostaio=io_uring, qcow2, or writes into preallocated space. Configure VM disks.
dd if=/dev/zero in the guest returns instantly, then stallsqemu detect_zeroes is dropping the writes; not the filesystem
Creates and deletes take hundreds of millisecondsExpected: synchronous metadata over device round trips. Performance model.
A large copy gets slower as it goesCheck bg_pick_scan and bg_desc_refreshed; report it with those numbers

Getting more information

  • dmesg | grep cetrafs: errors and warnings are always logged.
  • Turn on debug logging for a full trace.
  • cat /proc/fs/cetrafs/*/{info,cluster,properties} from every node, as root.
Danger

Never rmmod -f cetrafs. A forced removal can leave a dangling entry in the kernel’s memory-reclaim list that oopses the host on the next reclaim pass, and it persists until reboot. Unmount, then use plain rmmod.

Last updated