Covers: what a volume is, what has to be configured in the GUI vs Terraform, how to deploy an app with a volume, and how to grow a volume after deployment. Primary examples use an image-backed HDD drive; HDD_EMPTY is covered as a separate use case at the end.
Sources: lf-edge/eve, zededa/zedcloud Terraform provider docs, ZEDEDA Help Center (Storage Overview, Manage an Edge Application Instance, ZCLI volume-instance docs).
A volume instance is the storage object EVE-OS attaches to an app instance as a drive. It backs one of:
A volume can be:
zcli volume-instance create) and then referenced by label when the app is deployed
Underlying storage is a qcow2 file (ext4 persist) or a zvol (ZFS persist), depending on how the edge node's /persist partition was provisioned at install time — see the separate EVE-OS Partitioning / ZFS wiki page for that layer. Volumes live inside whichever persist backend the node has.
| Field | Where it shows up | What it does |
|---|---|---|
Drive Type (drvtype) | GUI Drives pane / TF drvtype | HDD = image-backed. CDROM = read-only image, optical semantics. NET = network-backed. HDD_EMPTY = blank disk of maxsize (covered in section 6). |
Max Size (maxsize / maxsizebytes) | GUI Drives pane “Max Size” / TF maxsize | Capacity ceiling for the drive. For HDD, this must be >= the image size; any headroom above the image size is usable, growable space on that same disk. |
Preserve (preserve) | GUI Drives pane “Preserve” | Whether this drive's data survives a purge/refresh of the app instance, vs. being rebuilt from the source image. |
Allow Storage Resize (allow_storage_resize / allowStorageResize) | App instance level, GUI/zcli/TF | Must be enabled before an existing app instance's drive size can be increased. Default: false. |
Volume Label (volumelabel) | GUI Drives pane / TF | References a pre-created (explicit) volume instance instead of an inline drive definition. |
Mount Path (mountpath) | GUI Drives pane / TF | Path inside the app where the drive is mounted. Empty or / defines the rootfs. |
zedcloud_application_instance (or zedcloud_deployment for policy-driven rollout).drvtype, maxsize, preserve, mountpath, imagename / imvolname / mvolname, volumelabel.allow_storage_resize (bool, default false) — must be true to permit a later maxsize change to apply.zedcloud_volume_instance family) and referenced by label from the app instance.zcli volume-instance create <name> –volume-type=<type> –project=<project> (–edge-node=<node> | –edge-node-cluster=<cluster>) –size=<size> –access-mode=<mode>zcli volume-instance update <name> [–title=…] [–description=…]“allowStorageResize”: trueThis is the common case: a single image-backed drive that serves as both the app's rootfs and its data storage, sized larger than the image itself so there's room to grow later.
/ (or empty) to define the rootfsRUNNING and the drive shows the expected size under app instance details.resource "zedcloud_application_instance" "example" {
name = "my-app-instance"
app_id = zedcloud_application.example.id
device_id = data.zedcloud_edgenode.target.id
project_id = data.zedcloud_project.example.id
drives {
drvtype = "HDD"
imagename = "my-app-image"
mountpath = "/"
maxsize = "21474836480" # 20 GiB ceiling, even if the image itself is much smaller
preserve = true
}
allow_storage_resize = true
}
terraform plan / terraform apply.terraform state show zedcloud_application_instance.example or check the GUI app instance detail page.
Important: this is not a live/hot resize. Editing a drive on an existing app instance triggers a Purge & Update — the app purges and restarts. Data on that drive is lost unless preserve is set on it.
RUNNING.resource "zedcloud_application_instance" "example" {
# ...unchanged config...
drives {
drvtype = "HDD"
imagename = "my-app-image"
mountpath = "/"
maxsize = "42949672960" # was 20 GiB, now 40 GiB
preserve = true
}
allow_storage_resize = true # must be true BEFORE the maxsize change is allowed to apply
}
terraform apply. If allow_storage_resize was false on the last-applied state, apply that change first, then apply the maxsize change (or in the same apply if the provider allows it — verify against current provider version behavior before assuming ordering).EVE enlarges the backing volume (qcow2/zvol); it does not grow the guest's partition or filesystem automatically. After the app instance comes back up:
growpart /dev/xxx N then resize2fs /dev/xxxNgrowpart then xfs_growfs <mountpoint>
HDD_EMPTY is a second, complementary pattern rather than an alternative to the above: a completely blank disk, not backed by any image or content tree, used as a separate data drive alongside an HDD rootfs drive.
maxsize./data, /var/lib/mysql), separate from /.preserve, maxsize, and allow_storage_resize mechanics apply — grown the same way as described in section 5, just as a second drive block rather than the rootfs drive.drives {
drvtype = "HDD_EMPTY"
maxsize = "10737418240" # 10 GiB blank data disk
preserve = true
mountpath = "/data"
}
Use this when you want the OS/app image to stay a fixed, replaceable artifact (rebuilt cleanly on every app update) while the data lives on its own drive that is never touched by an image update — as opposed to the HDD pattern in sections 4-5, where rootfs and data share one disk and the whole disk gets rebuilt from the image on update unless preserve is set.
allow_storage_resize=true and applying a maxsize change in a single Terraform apply — not confirmed from docs, test on a non-prod app instance first./persist storage pool (ext4 disk or ZFS pool) — see the separate Partitioning/ZFS page for that, which is a install-time/reinstall operation, not a controller-driven one.