abiosoft/colima · error

no existing storage pool disks found

Error message

no existing storage pool disks found

What it means

The pool disks directory was listed successfully, but strings.Fields produced zero entries — no storage pool .img files were found to feed into 'incus admin recover'. Recovery cannot proceed without at least one disk source, so it aborts (the caller then offers retry or wipe).

Source

Thrown at environment/container/incus/incus.go:448

func (c *incusRuntime) poolImported() bool {
	script := strings.NewReplacer(
		"{pool_name}", poolName,
	).Replace("sudo zpool list -H -o name | grep '^{pool_name}$'")
	return c.guest.RunQuiet("sh", "-c", script) == nil
}

func (c *incusRuntime) recoverDisk(ctx context.Context) error {
	var disks []string
	str, err := c.guest.RunOutput("sh", "-c", "sudo ls "+poolDisksDir+" | grep '.img$'")

	if err != nil {
		return fmt.Errorf("cannot list storage pool disks: %w", err)
	}

	disks = strings.Fields(str)
	if len(disks) == 0 {
		return fmt.Errorf("no existing storage pool disks found")
	}

	log := c.Logger(ctx)

	log.Println()
	log.Println("Running 'incus admin recover' ...")
	log.Println()
	log.Println(fmt.Sprintf("Found %d storage pool source(s):", len(disks)))
	for _, disk := range disks {
		log.Println("  " + poolDisksDir + "/" + disk)
	}
	log.Println()

	if err := c.guest.RunInteractive("sudo", "incus", "admin", "recover"); err != nil {
		return fmt.Errorf("error recovering storage pool: %w", err)
	}

	out, err := c.guest.RunOutput("sudo", "incus", "storage", "list", "name="+poolName, "-c", "n", "--format", "compact,noheader")

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Verify pool disk images exist: 'colima ssh -- sudo ls -la /var/lib/incus/disks'
  2. Restore missing .img files from backup if the data matters
  3. Otherwise let colima discard and recreate the pool (answer 'no' at retry prompt)
  4. Reset inconsistent state with 'colima delete && colima start'
Defensive patterns

Strategy: validation

Validate before calling

// explicit pre-check with useful context before invoking recovery
entries, err := c.guest.RunOutput("sh", "-c", "sudo find "+poolDisksDir+" -name '*.img' 2>/dev/null")
if err != nil || strings.TrimSpace(entries) == "" {
    return fmt.Errorf("no pool disks under %s; mount data disk or skip recovery", poolDisksDir)
}

Try / catch

disks := strings.Fields(str)
if len(disks) == 0 {
    return fmt.Errorf("no existing storage pool disks found")
    // callers already prompt retry-or-wipe; surface dir path for the user
}

Prevention

When it happens

Trigger: recoverDisk() finds len(disks)==0 after listing: directory contains only non-.img entries, output is empty/whitespace, or files were moved elsewhere.

Common situations: Previous wipe removed disks but DiskProvisioned marker still true, user manually relocated disk images, external disk mounted at wrong point.

Related errors


AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15). Data as JSON: /api/errors/46a55eeb4123fae1. Report an issue: GitHub.