{"record":{"id":"e24d53e92df855c1","repo":"containerd/containerd","slug":"mkfs-erofs-does-not-support-tar-mode-tar-option","errorCode":null,"errorMessage":"mkfs.erofs does not support tar mode (--tar option), disabling erofs differ: %w","messagePattern":"mkfs\\.erofs does not support tar mode \\(--tar option\\), disabling erofs differ: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"plugins/diff/erofs/plugin/plugin.go","lineNumber":61,"sourceCode":"\t// Linux only\n\tEnableDmverity bool `toml:\"enable_dmverity\"`\n}\n\nfunc init() {\n\tregistry.Register(&plugin.Registration{\n\t\tType: plugins.DiffPlugin,\n\t\tID:   \"erofs\",\n\t\tRequires: []plugin.Type{\n\t\t\tplugins.MetadataPlugin,\n\t\t},\n\t\tConfig: &Config{},\n\t\tInitFn: func(ic *plugin.InitContext) (any, error) {\n\t\t\ttarModeSupported, err := erofsutils.SupportGenerateFromTar()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed to check mkfs.erofs availability: %v: %w\", err, plugin.ErrSkipPlugin)\n\t\t\t}\n\t\t\tif !tarModeSupported {\n\t\t\t\treturn nil, fmt.Errorf(\"mkfs.erofs does not support tar mode (--tar option), disabling erofs differ: %w\", plugin.ErrSkipPlugin)\n\t\t\t}\n\n\t\t\tmd, err := ic.GetSingle(plugins.MetadataPlugin)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tp := platforms.DefaultSpec()\n\t\t\tp.OS = \"linux\"\n\t\t\tic.Meta.Platforms = append(ic.Meta.Platforms, p)\n\t\t\t// Select this differ for EROFS native images by default\n\t\t\tp.OSFeatures = []string{\"erofs\"}\n\t\t\tic.Meta.Platforms = append(ic.Meta.Platforms, p)\n\t\t\tcs := md.(*metadata.DB).ContentStore()\n\t\t\tconfig := ic.Config.(*Config)\n\n\t\t\tvar opts []erofs.DifferOpt\n","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/containerd/containerd/blob/4246446a2bf7d03837b0244118d858799393bd80/plugins/diff/erofs/plugin/plugin.go#L43-L79","documentation":"During erofs differ plugin init, if mkfs.erofs exists but does not support tar mode (the --tar option), the plugin returns plugin.ErrSkipPlugin wrapped in this message. This disables the erofs differ gracefully instead of failing runtime diffs. It signals the installed erofs-utils version is too old for tar-based snapshot generation.","triggerScenarios":"InitFn calling erofsutils.SupportGenerateFromTar() and getting tarModeSupported == false, i.e. mkfs.erofs output lacks the --tar flag.","commonSituations":"Distributions shipping older erofs-utils versions without --tar support; minimal base images with an outdated mkfs.erofs.","solutions":["Upgrade erofs-utils to a version supporting --tar (mkfs.erofs v1.6+ supports tar mode)","Confirm with `mkfs.erofs --help` that --tar is listed","Accept the skip if another differ (e.g. overlayfs) suffices"],"exampleFix":"// before: differ skipped\n// after: upgrade tooling\n# apt-get install -y erofs-utils  # ensure version with --tar support\n$ mkfs.erofs --help | grep tar","handlingStrategy":"validation","validationCode":"out, err := exec.Command(\"mkfs.erofs\", \"--help\").CombinedOutput()\nif err != nil || !strings.Contains(string(out), \"--tar\") {\n    // mkfs.erofs too old; erofs differ will be skipped\n}","typeGuard":null,"tryCatchPattern":"if err := initErofsPlugin(); err != nil {\n    var skip plugin.ErrSkipPlugin\n    if errors.As(err, &skip) {\n        log.Warn(\"erofs differ disabled\", \"cause\", err)\n    } else {\n        return err\n    }\n}","preventionTips":["Pin erofs-utils >= version with --tar support in host images","Add a version check for mkfs.erofs to provisioning scripts","Keep overlayfs or another differ available as fallback"],"tags":["erofs","external-binary","version-compat","plugin-skip"],"backgroundTag":"incompatible-binary-version","analyzedSha":"4246446a2bf7d03837b0244118d858799393bd80","analyzedAt":"2026-09-02T00:14:43.053Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}