{"record":{"id":"fba64d809e6856f9","repo":"crowdsecurity/crowdsec","slug":"unknown-fstype-d","errorCode":null,"errorMessage":"unknown fstype %d","messagePattern":"unknown fstype (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/fsutil/getfstype.go","lineNumber":110,"sourceCode":"\t0xa501fcf5: \"vxfs\",\n\t0xabba1974: \"xenfs\",\n\t0x012ff7b4: \"xenix\",\n\t0x58465342: \"xfs\",\n\t0x2fc12fc1: \"zfs\",\n}\n\nfunc GetFSType(path string) (string, error) {\n\tvar buf unix.Statfs_t\n\n\terr := unix.Statfs(path, &buf)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tfsType, ok := fsTypeMapping[int64(buf.Type)] //nolint:unconvert\n\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"unknown fstype %d\", buf.Type)\n\t}\n\n\treturn fsType, nil\n}\n","sourceCodeStart":92,"sourceCodeEnd":115,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/fsutil/getfstype.go#L92-L115","documentation":"On Linux, GetFSType statfs's a path and looks the returned filesystem magic number up in fsTypeMapping. If buf.Type isn't a known magic constant, the filesystem (or the platform variation of it) isn't in the table and this error is returned.","triggerScenarios":"Calling GetFSType(path) on Linux where the underlying filesystem's statfs magic number is absent from fsTypeMapping — exotic FUSE filesystems, newer kernels with filesystems unknown to this table, or unusual virtual filesystems.","commonSituations":"Monitoring or acquisition code inspecting mounts on unusual setups: NFS variants, overlayfs on newer kernels, zfs, btrfs modules, or container-specific filesystems not yet mapped.","solutions":["Identify the filesystem via `stat -f <path>` and add its magic number to fsTypeMapping in pkg/fsutil/getfstype.go","As a workaround, call unix.Statfs directly and map the type yourself","Handle the error and treat the filesystem as unknown instead of failing the caller","Upgrade to a version whose fsTypeMapping includes your filesystem"],"exampleFix":"// in fsTypeMapping, add the missing fs magic\nconst NFS_SUPER_MAGIC = 0x6969\nfsTypeMapping = map[int64]string{\n    ...\n    NFS_SUPER_MAGIC: \"nfs\",\n}","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"fsType, err := fsutil.GetFSType(path)\nif err != nil {\n    log.Debugf(\"fs type unknown for %s: %v\", path, err)\n    fsType = \"unknown\" // degrade gracefully\n}","preventionTips":["Check `stat -f` output for exotic filesystems in your environment","Keep fsTypeMapping current with kernel-supported filesystems","Treat unknown fstype as non-fatal for monitoring use cases","Contribute the missing magic number upstream when you identify it"],"tags":["go","linux","filesystem","statfs"],"backgroundTag":"invalid-enum-value","analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}