Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Incus Ceph Cluster: Fix Node Network & Storage

· 6 min read · Home Networking

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

This guide walks you through diagnosing and fixing node network and storage failures in an Incus cluster backed by Ceph. You'll learn how to identify whether a problem is network- or storage-related, check the health of both layers, and apply targeted fixes to restore normal operation. Before you start, make sure you have root or sudo access to all cluster nodes, the incus and ceph command-line tools installed, and SSH access to each node.

What You'll Need

  • Root or sudo access on every Incus node.
  • The incus client installed on your admin machine.
  • The ceph command-line tools (usually provided by the ceph-common package) on at least one node.
  • SSH access to all cluster nodes for remote commands.
  • Basic familiarity with the command line and YAML configuration files.

Step-by-Step

  1. Check Incus cluster health. Run incus cluster list on any node. Look for nodes marked OFFLINE or BLOCKED. If a node is offline, that node's network or storage may be failing. Note the node name and its roles.
  2. Check Ceph cluster health. On a node with Ceph tools, run ceph -s. Look for HEALTH_WARN or HEALTH_ERR. Pay attention to the osdmap and pgmap sections—if OSDs are down or placement groups are degraded, storage is the issue.
  3. Isolate network vs. storage. If Ceph is healthy but Incus nodes are offline, the problem is likely network-related. If Ceph shows errors, storage is the primary suspect. Run incus cluster list --format yaml to see detailed node status, including last heartbeat time.
  4. Check node connectivity. From the admin machine, ping the failing node: ping <node-ip>. Then SSH into it: ssh <node-ip>. If ping fails, the node is unreachable—check physical links, switches, and firewall rules. If SSH works, the node is up but may have lost cluster communication.
  5. Verify Incus daemon status. On the failing node, run systemctl status incus (or incusd on older versions). If it's not running, start it with systemctl start incus. Check logs with journalctl -u incus -n 50 for errors like "failed to connect to cluster" or "heartbeat timeout".
  6. Check Ceph OSD status. Run ceph osd tree to see which OSDs are up. If an OSD is down, check its host: ssh <osd-host> systemctl status ceph-osd@<osd-id>. Restart it if needed: systemctl restart ceph-osd@<osd-id>. If it keeps crashing, check /var/log/ceph/ceph-osd.<id>.log for disk errors or network timeouts.
  7. Inspect Ceph network settings. On each Ceph node, check /etc/ceph/ceph.conf for the cluster_network and public_network settings. Ensure they match the actual IP ranges of your nodes. Misconfiguration here is a common cause of storage failures.
  8. Check for split-brain or clock skew. Run ceph health detail for specific warnings. Clock skew between nodes can cause Ceph to mark OSDs down. Use chronyc tracking or ntpq -p to verify time sync. If skew is significant, configure NTP properly on all nodes.
  9. Test storage access from Incus. On a node with Incus, run incus storage list to see configured pools. Then incus storage show <pool-name> to check the driver and source. If the pool is Ceph-based, run ceph auth get client.incus to verify the keyring is valid and has the right permissions.
  10. Restart Incus services. If network and Ceph look healthy but Incus still reports failures, restart the Incus daemon on the affected node: systemctl restart incus. This often clears stale connections.
  11. Rejoin a node to the cluster. If a node remains offline and cannot be recovered, you may need to remove it and re-add it. On a healthy node, run incus cluster remove <node-name>. Then on the failed node, after fixing the underlying issue, run incus cluster add <node-name> and follow the join instructions.
  12. Monitor recovery. After fixes, watch ceph -s until HEALTH_OK and incus cluster list shows all nodes online. Use watch -n 5 ceph -s to see progress.

Common Mistakes

  • Ignoring firewall rules: Incus uses port 8443 for clustering, and Ceph uses ports 6789 and 6800-7300. Blocking these on any node will cause failures.
  • Clock skew: Ceph is sensitive to time differences. If NTP is not configured, OSDs may flap up and down.
  • Mixing public and cluster networks: Using the same subnet for both can cause routing issues. Keep them separate.
  • Restarting OSDs without checking disk health: If a disk is failing, restarting the OSD will only delay the problem. Always check dmesg for I/O errors.
  • Forgetting to update Ceph keyring: If you rotate keys, Incus may lose access to the pool. Always update /etc/ceph/ceph.client.incus.keyring on all nodes.

Tips

  • Set up monitoring with ceph dashboard and incus monitor to catch issues early.
  • Use ceph osd out to temporarily remove a problematic OSD from the cluster before fixing it, to avoid data loss.
  • Keep a maintenance window for major changes; Ceph rebalancing can be I/O intensive.
  • Document your network topology and Ceph configuration in a wiki for quick reference.
  • Test failover by deliberately stopping a node in a test environment to ensure your procedures work.

Troubleshooting

If the steps above don't resolve the issue, try these additional checks:

  • Check logs: On the failing node, run journalctl -u incus -f and tail -f /var/log/ceph/ceph.log simultaneously to see real-time errors.
  • Test Ceph network with iperf: Use iperf3 between nodes to verify bandwidth and latency. High latency can cause timeouts.
  • Check disk space: Run df -h on Ceph nodes. Full disks can cause OSDs to go down.
  • Verify DNS resolution: Incus and Ceph rely on hostnames. Ensure /etc/hosts or DNS is consistent across nodes.
  • If all else fails, back up and reinstall: Sometimes a corrupted configuration is easier to rebuild than debug. Save your Incus configuration with incus admin dump and Ceph config with ceph config dump.

Frequently Asked Questions

  1. Q: How do I know if the problem is network or storage?
    A: Check ceph -s first. If Ceph is healthy, the issue is likely network. If Ceph shows errors, storage is the primary suspect. Also, if only one node is offline, it's probably network; if multiple nodes are affected, storage may be the culprit.
  2. Q: Can I restart a Ceph OSD without affecting running instances?
    A: Yes, but you should first set the OSD to out with ceph osd out <id> to allow data to rebalance. Restarting an OSD will briefly interrupt I/O, but Incus instances will retry and should continue once the OSD is back.
  3. Q: What does "heartbeat timeout" mean in Incus logs?
    A: It means the node failed to send a heartbeat to the cluster within the expected interval (usually 20 seconds). This is often due to network congestion, firewall, or a stalled daemon. Check network connectivity and system load.
  4. Q: How do I add a new node to an existing Ceph-backed Incus cluster?
    A: Install Incus and Ceph packages, configure the Ceph keyring, then run incus cluster add <new-node-name> on an existing node. Follow the instructions to join. The new node will automatically get access to the Ceph pool.
  5. Q: What should I do if a Ceph pool is full?
    A: Immediately add more OSDs or increase the pool's size. You can also temporarily set ceph osd set-full-ratio 0.95 to allow more writes, but this is risky. Better to clean up unused images with incus image delete.
  6. Q: Why does my Incus cluster show a node as blocked?
    A: A blocked node usually means it's still part of the cluster but not responding. This can happen during network partitions. Check the node's network and try restarting the Incus daemon on it. If it persists, remove and re-add the node.