{"record":{"id":"f1bf6ef76b8b07db","repo":"abiosoft/colima","slug":"default-storage-pool-recovery-failure","errorCode":null,"errorMessage":"default storage pool recovery failure","messagePattern":"default storage pool recovery failure","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"environment/container/incus/incus.go","lineNumber":472,"sourceCode":"\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\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif out != poolName {\n\t\treturn fmt.Errorf(\"default storage pool recovery failure\")\n\t}\n\n\treturn nil\n}\n\nfunc (c *incusRuntime) wipeDisk(size int) error {\n\t// prepare by deleting relevant files/directories\n\tdeleteScript := strings.NewReplacer(\n\t\t\"{disk_file}\", poolDiskFile,\n\t\t\"{meta_dir}\", poolMetaDir,\n\t).Replace(\"sudo rm -rf {disk_file} {meta_dir}\")\n\n\tif err := c.guest.RunQuiet(\"sh\", \"-c\", deleteScript); err != nil {\n\t\treturn fmt.Errorf(\"error preparing storage pools directory: %w\", err)\n\t}\n\n\t// create new storage pool\n\tvar diskSize = fmt.Sprintf(\"%dGiB\", size)","sourceCodeStart":454,"sourceCodeEnd":490,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/environment/container/incus/incus.go#L454-L490","documentation":"Post-recovery verification: colima lists storage pools filtered by name and compares the output to the expected pool name; a mismatch means 'incus admin recover' reported success but the default pool is still absent from incus's database. Recovery is treated as failed even though no low-level command errored.","triggerScenarios":"Output of 'incus storage list name=<pool> -c n --format compact,noheader' != poolName: pool created under a different name, output formatting changed (extra whitespace/headers) across incus versions, or recovery silently skipped the pool.","commonSituations":"Guest incus version formats 'compact,noheader' differently than colima expects, pool recovered under a renamed entry, partially migrated old disk layout.","solutions":["Check actual pools: 'colima ssh -- sudo incus storage list'","If the pool exists under a different name, decide to keep or delete it, then retry start","Discard and recreate: answer 'no' at the retry prompt so colima wipes the disk","Report version-specific formatting differences to colima if pool exists yet detection fails"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// compare normalized output to survive formatting drift\nout, err := c.guest.RunOutput(\"sudo\", \"incus\", \"storage\", \"list\", \"name=\"+poolName, \"-c\", \"n\", \"--format\", \"compact,noheader\")\nif err != nil {\n    return err\n}\nif strings.TrimSpace(out) != poolName {\n    return fmt.Errorf(\"default storage pool recovery failure\")\n}","typeGuard":null,"tryCatchPattern":"out, err := c.guest.RunOutput(\"sudo\", \"incus\", \"storage\", \"list\", ...)\nif err != nil {\n    return err\n}\nif strings.TrimSpace(out) != poolName {\n    // verify with an unfiltered listing before declaring failure\n    full, _ := c.guest.RunOutput(\"sudo\", \"incus\", \"storage\", \"list\", \"--format\", \"json\")\n    return fmt.Errorf(\"default storage pool recovery failure (pools now: %s)\", full)\n}","preventionTips":["Pin guest incus version to the one colima was tested with","After recovery, manually verify with 'incus storage list' before relying on the pool","Report format drift (extra columns/whitespace) upstream quickly — it breaks detection"],"tags":["incus","storage","recovery","verification"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}