cetrafs
How-to guideTask-oriented

How-to guides

Recipes for specific jobs: install, prepare storage, mount, tune, monitor, repair and recover.

How-to guides assume you already know what cetrafs is and have a specific job to do. Each one covers a single task, from start to finish. If you are new to cetrafs, start with the tutorials.

Install · Debian packages · DKMS · from source

Prepare storage · check for atomic CAW · set the stale window for multipath · validate the storage stack

Set up · create a volume · mount at boot · enable live migration · configure VM disks

Operate · monitor · tune a live mount · defragment · debug logging

Repair and recover · check and repair · recover from a node failure · upgrade to a new format

Install from Debian packages Build the cetrafs-dkms and cetrafs-tools packages and install them so the module survives kernel upgrades and loads on first mount. Install with DKMS Register the cetrafs module with DKMS directly, without building Debian packages, so it rebuilds on every kernel upgrade. Build and install from source Build the kernel module and tools with make, and install them by hand so the module loads automatically on mount. Check a LUN for atomic CAW Probe whether a block device supports SCSI COMPARE AND WRITE, without mounting it, to find out if it can back a multi-node cluster. Set the stale window for multipath Make sure a host gives up on failed I/O before its peers give up on the host, by checking dm-multipath queueing against stale_secs. Create a volume Format a block device with mkfs.cetra, preview the geometry first, and choose node, inode and journal capacity. Mount a volume at boot Mount cetrafs read-write or as a read-only observer, by hand, from /etc/fstab, or with a systemd mount unit. Enable live migration Mount with nofilelock so qemu can open a VM image on two nodes during an online-migration handoff, and take the lock back per file with flock when you need it. Configure VM disks for cetrafs Use raw images, cache=none, aio=threads and no preallocation for VM disks on cetrafs, and see what each setting is worth. Monitor a volume What to watch on a live cetrafs cluster: free space, node liveness, write readiness, contention, journal replays and the kernel log. Tune a live mount Change heartbeat timing and defragmentation on a mounted volume through the controls file, and set boot-time defaults with module parameters. Check and repair a volume Run fsck.cetra offline, understand what it will and won't repair, and act on its exit codes. Defragment a file Relocate a fragmented file into one contiguous run while the filesystem is live, by hand with defrag.cetra or automatically in the background. Recover from a node failure What happens automatically when a node dies, how to bring it back, how to recover a fenced mount, and what the small post-crash leak means. Upgrade to a new format version Move a volume to a new cetrafs on-disk format by evacuating, reformatting and restoring. There is no in-place migration. Turn on debug logging Enable the full cetrafs trace at runtime with dynamic debug, narrow it to a file or function, and turn it off again. No rebuild or remount needed. Validate a storage stack before deployment Prove each layer, from the raw LUN up to live-migrating VMs, before the next, so a fault can always be traced to the layer that caused it. Run the test suites Run the loop-device suite, the crash rig, the soak and the release matrix, and the multi-node ctest suite on a real shared LUN.