Docs
/ How-to guides How-to guide Task-oriented
How-to guides Recipes for specific jobs: install, prepare storage, mount, tune, monitor, grow, reclaim space, repair, recover and upgrade.
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 · on Proxmox VE · 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 · live migration on Proxmox · live migration without nofilelock · Proxmox storage plugin · configure VM disks
Operate · monitor · tune a live mount · defragment · grow a volume · reclaim thin space · debug logging
Repair and recover · check and repair · recover from a node failure · upgrade
Install from Debian packages
Install the cetrafs-dkms and cetrafs-tools packages from a GitHub release, or build them yourself, so the module survives kernel upgrades and loads on first mount.
Install on Proxmox VE
Quick install of the cetrafs packages, the pve-storage-cetrafs storage plugin and its web UI integration from their GitHub releases, on every node of a Proxmox VE cluster.
Secure Boot
Enroll the DKMS signing key on each node so a kernel with Secure Boot accepts cetrafs.ko, and fix "Key was rejected by service".
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's writes can never be held longer than it is allowed to stall, by checking SCSI, iSCSI, FC and dm-multipath timers 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.
Live migration on Proxmox
Why Proxmox VE needs the nofilelock mount option for live migration, how to set it, what it costs, and why we think Proxmox's approach to image locking is wrong.
Live migration without nofilelock
For integrators: live-migrate qemu VMs on a default cetrafs mount by handing each disk's lock from source to target, with every file still protected. The protocol, the qemu setup, failure handling and measured pauses.
Proxmox storage plugin
Use the pve-storage-cetrafs plugin to add a shared LUN as a cetrafs storage in Proxmox VE: over a Proxmox iSCSI storage or on any block device, mounted on every node automatically, from pvesm or the web UI.
Configure VM disks for cetrafs
Use raw images, cache=none, aio=threads, no preallocation and discard=on 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 per node, node liveness, damage marks, contention, journal replays, discard and the kernel log.
Tune a live mount
Change heartbeat timing, defragmentation and discard on a mounted volume through the controls file, and set boot-time defaults with module parameters.
Check and repair a volume
Check a cetrafs volume while it is in use with fsck.cetra --live, repair it offline with -r, understand what it will and won't repair, and act on its exit codes.
Defragment a file
Move a fragmented file into contiguous runs while the filesystem is live, by hand with defrag.cetra or automatically in the background.
Grow a volume
Grow a cetrafs volume after its LUN has grown, or into space mkfs.cetra -s left unformatted, with growfs.cetra: live while it is mounted, or offline.
Reclaim thin space
Give space freed in cetrafs back to a thin-provisioned LUN with UNMAP: automatically when a Block Group empties, with fstrim, or inline with -o discard, and pass guest TRIM through.
Recover from a node failure
What happens automatically when a node dies, how to hand its files over sooner, how to bring it back, recover a stopped mount, a damaged superblock or a journal that won't settle, and what the small post-crash leak means.
Upgrade cetrafs
Upgrade between releases of one on-disk format node by node, or move a volume to a new format version by evacuating, reformatting and restoring. 0.9.x to 0.10 is a format change.
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 gate, the randomized suites, the configuration matrix, the crash rig, the soak and the release matrix, and the multi-node ctest suite on a real shared LUN.