Skip to content

Storage Design ​

A datastore's scope decides what its VMs can do. Shared datastores — reachable by every host in a cluster — are what make fast live migration, HA restarts, DRS balancing and multi-host Kubernetes clusters possible.


Datastore Types ​

ScopeTypeBacked byTypical use
LocalLocal directoryA directory on the host (libvirt directory pool).Scratch VMs, the Cockpit appliance during deployment.
LocalLocal disk deviceA whole, unpartitioned, unmounted local disk.Dedicated local performance disk.
SharedShared NFSAn NFS export mounted at the same path on every host.ISOs, templates, general-purpose VMs, Kubernetes RWX volumes.
SharedShared Clustered FS (OCFS2)A SAN LUN (iSCSI or Fibre Channel, usually multipathed) formatted with OCFS2 and coordinated by the datacenter's shared group.Production VMs that need HA and DRS on block storage.

A VM is eligible for DRS balancing and compute-only (fast) live migration only when all of its disks are on shared datastores. VMs on local storage can still be migrated, but the disk must be copied too. See Creating Datastores for every option of the datastore wizard.


Reference Storage Layout ​

DatastoreTypeSourcePurpose
local on each hostLocal directoryHost boot diskInitial home of the Cockpit appliance; scratch.
ds-nfs-01Shared NFS192.168.242.100:/exports/cockpit-ds01 via nfs0ISO library, templates, general VMs.
ds-san-01Shared Clustered FS (OCFS2)iSCSI LUN through iscsia0 and iscsib0, multipathProduction VMs, the Cockpit appliance after relocation.

Addresses and names are example values from the network design.


NFS Requirements ​

  • Export the directory read-write to the NFS subnet only, for example:
    text
    /exports/cockpit-ds01  192.168.242.0/24(rw,sync,no_root_squash)
    Hypervisors need root-level access to create and own disk images, which is why no_root_squash is required. Because of it, never export the directory to a wider network than the hosts' NFS subnet.
  • The NFS server should itself be redundant: bonded uplinks to both switches, redundant controllers or an HA pair.
  • Cockpit mounts the export at the same path on every host, by default /mnt/<cluster-name>/<datastore-name>.

iSCSI and Multipath Requirements ​

  • The array presents one target portal on each fabric (for example 192.168.243.100 and 192.168.244.100). Do not route between the two iSCSI subnets.
  • Each host uses the Vapor iSCSI software adapter in multipath mode with two port bindings: iscsia0 and iscsib0. Each host has one initiator IQN, for example iqn.2026-10.example.corp:vapor-01.
  • Map the LUN to the IQNs of all hosts (one host group on the array). Every host must see the same LUN identity (WWID); device names such as /dev/sdd may differ per host.
  • CHAP is recommended, and should be considered required when the iSCSI VLANs are shared with other systems.

OCFS2 and the Shared Group ​

When several hosts write to the same LUN at the same time, they must coordinate. Cockpit uses the OCFS2 clustered filesystem with its O2CB cluster stack. The shared group is that O2CB cluster; it is configured once per datacenter, and every host that mounts an OCFS2 datastore must be a member. Members talk to each other on TCP 7777 over the cluster network (VLAN 245, clus0 in the reference design).

The prerequisite order for an OCFS2 datastore is:

  1. iSCSI sessions with multipath on every host.
  2. The shared group, active on every host.
  3. The OCFS2 datastore.

Data or connectivity loss

A clustered datastore is only safe while its shared group is active and in sync on all participating hosts. Never mount or write to an OCFS2 LUN outside the shared group, and never take several members out of the group at the same time: survivors may fence (hard-reset) themselves to protect the data.

TIP

Keep the cluster network on the bond (two switches) so a single link failure never looks like a node failure. Heartbeat loss is what triggers fencing.