Skip to content

Storage

Mica OS uses three partitions. UEFI boards have ESP/SYSTEM/DATA; U-Boot boards (cx3576, s905x5m) have FIRMWARE/SYSTEM/DATA. Only DATA grows to use the medium. SYSTEM contains immutable signed deployment files, and firmware remains separate from normal OS updates.

status: shipped — evidence: mica-boards:boards/x64/board.env, mica-boards:boards/virt-arm64/board.env, mica-boards:boards/cx3576/board.env

Path Purpose
/mica/config Appliance configuration managed through the API
/mica/apps, /mica/containers Managed applications and container data
/srv Operator files and application data
/home, /root Persistent user homes backed by /mica
Selected /var/lib leaves Persistent service state on DATA
/var/tmp Bounded disk-backed temporary data
/run, /tmp Volatile per-boot data

Identity, credentials and service state are stored under physical DATA/state; update and lifecycle records use DATA/meta. Those namespaces are managed by the system. Use the API for configuration rather than editing their internal files.

The /var parent tree is read-only. Only explicitly supported leaves are writable; an arbitrary new /var directory fails with EROFS. Logs remain volatile, so save diagnostic evidence before shutting down a test device.

status: shipped — evidence: docs/design/storage.md, mica-system:overlay/etc/systemd/system/

All DATA binds share one filesystem. The storage API reports its capacity once, with directory/project accounting and bind readiness alongside it. Bulk and disposable writers have byte and inode quotas that preserve measured room for essential state and metadata. Ordinary services cannot bypass these limits with CAP_SYS_RESOURCE.

A directory reset removes only the selected allowlisted scope and preserves identity and retained lifecycle/deployment records. OS rollback does not undo writable application data. Full reflash replaces the current image contents; it is not a secure erase of every physical sector beyond the image.

status: shipped — evidence: mica-core:micad/src/storage_status.rs, mica-core:micad/src/reset.rs, mica-system:overlay/usr/lib/mica/mica-data-layout

Missing, read-only or damaged DATA/SYSTEM stops the affected boot path for explicit recovery. The system does not create default credentials on the immutable root, reset exhausted counters or silently mount a substitute state directory. Save serial and image/component identities when reporting a failure.

Physical eMMC durability and board recovery require the cx3576 bench tests; QEMU and offline checks establish only their stated software behavior.

status: board-dependent — evidence: docs/design/uboot-ab-handshake.md