{"record":{"id":"46a55eeb4123fae1","repo":"abiosoft/colima","slug":"no-existing-storage-pool-disks-found","errorCode":null,"errorMessage":"no existing storage pool disks found","messagePattern":"no existing storage pool disks found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"environment/container/incus/incus.go","lineNumber":448,"sourceCode":"\nfunc (c *incusRuntime) poolImported() bool {\n\tscript := strings.NewReplacer(\n\t\t\"{pool_name}\", poolName,\n\t).Replace(\"sudo zpool list -H -o name | grep '^{pool_name}$'\")\n\treturn c.guest.RunQuiet(\"sh\", \"-c\", script) == nil\n}\n\nfunc (c *incusRuntime) recoverDisk(ctx context.Context) error {\n\tvar disks []string\n\tstr, err := c.guest.RunOutput(\"sh\", \"-c\", \"sudo ls \"+poolDisksDir+\" | grep '.img$'\")\n\n\tif err != nil {\n\t\treturn fmt.Errorf(\"cannot list storage pool disks: %w\", err)\n\t}\n\n\tdisks = strings.Fields(str)\n\tif len(disks) == 0 {\n\t\treturn fmt.Errorf(\"no existing storage pool disks found\")\n\t}\n\n\tlog := c.Logger(ctx)\n\n\tlog.Println()\n\tlog.Println(\"Running 'incus admin recover' ...\")\n\tlog.Println()\n\tlog.Println(fmt.Sprintf(\"Found %d storage pool source(s):\", len(disks)))\n\tfor _, disk := range disks {\n\t\tlog.Println(\"  \" + poolDisksDir + \"/\" + disk)\n\t}\n\tlog.Println()\n\n\tif err := c.guest.RunInteractive(\"sudo\", \"incus\", \"admin\", \"recover\"); err != nil {\n\t\treturn fmt.Errorf(\"error recovering storage pool: %w\", err)\n\t}\n\n\tout, err := c.guest.RunOutput(\"sudo\", \"incus\", \"storage\", \"list\", \"name=\"+poolName, \"-c\", \"n\", \"--format\", \"compact,noheader\")","sourceCodeStart":430,"sourceCodeEnd":466,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/environment/container/incus/incus.go#L430-L466","documentation":"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).","triggerScenarios":"recoverDisk() finds len(disks)==0 after listing: directory contains only non-.img entries, output is empty/whitespace, or files were moved elsewhere.","commonSituations":"Previous wipe removed disks but DiskProvisioned marker still true, user manually relocated disk images, external disk mounted at wrong point.","solutions":["Verify pool disk images exist: 'colima ssh -- sudo ls -la /var/lib/incus/disks'","Restore missing .img files from backup if the data matters","Otherwise let colima discard and recreate the pool (answer 'no' at retry prompt)","Reset inconsistent state with 'colima delete && colima start'"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// explicit pre-check with useful context before invoking recovery\nentries, err := c.guest.RunOutput(\"sh\", \"-c\", \"sudo find \"+poolDisksDir+\" -name '*.img' 2>/dev/null\")\nif err != nil || strings.TrimSpace(entries) == \"\" {\n    return fmt.Errorf(\"no pool disks under %s; mount data disk or skip recovery\", poolDisksDir)\n}","typeGuard":null,"tryCatchPattern":"disks := strings.Fields(str)\nif len(disks) == 0 {\n    return fmt.Errorf(\"no existing storage pool disks found\")\n    // callers already prompt retry-or-wipe; surface dir path for the user\n}","preventionTips":["Confirm .img files exist under the pool disks dir before choosing recovery","Mount external data disks prior to colima start","Take backups so 'wipe and recreate' is always an acceptable fallback"],"tags":["incus","storage","recovery","filesystem"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}