{"record":{"id":"fb290f6275de14f4","repo":"hashicorp/nomad","slug":"minimum-diskmb-value-is-10-got-d","errorCode":null,"errorMessage":"minimum DiskMB value is 10; got %d","messagePattern":"minimum DiskMB value is 10; got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/structs.go","lineNumber":10434,"sourceCode":"func (d *EphemeralDisk) Equal(o *EphemeralDisk) bool {\n\tif d == nil || o == nil {\n\t\treturn d == o\n\t}\n\tswitch {\n\tcase d.Sticky != o.Sticky:\n\t\treturn false\n\tcase d.SizeMB != o.SizeMB:\n\t\treturn false\n\tcase d.Migrate != o.Migrate:\n\t\treturn false\n\t}\n\treturn true\n}\n\n// Validate validates EphemeralDisk\nfunc (d *EphemeralDisk) Validate() error {\n\tif d.SizeMB < 10 {\n\t\treturn fmt.Errorf(\"minimum DiskMB value is 10; got %d\", d.SizeMB)\n\t}\n\treturn nil\n}\n\n// Copy copies the EphemeralDisk struct and returns a new one\nfunc (d *EphemeralDisk) Copy() *EphemeralDisk {\n\tld := new(EphemeralDisk)\n\t*ld = *d\n\treturn ld\n}\n\nvar (\n\t// VaultUnrecoverableError matches unrecoverable errors returned by a Vault\n\t// server\n\tVaultUnrecoverableError = regexp.MustCompile(`Code:\\s+40(0|3|4)`)\n)\n\nconst (","sourceCodeStart":10416,"sourceCodeEnd":10452,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/structs.go#L10416-L10452","documentation":"EphemeralDisk.Validate() enforces a minimum disk size of 10 MB. If the EphemeralDisk SizeMB is below 10, job registration fails with 'minimum DiskMB value is 10; got %d'. The ephemeral disk is the task's working directory allocation, and Nomad refuses sizes it considers too small to be useful.","triggerScenarios":"Submitting a job whose task/group ephemeral_disk block sets disk (SizeMB) to a value < 10, e.g. disk = 5, via HCL or the /v1/jobs API.","commonSituations":"Setting disk = 0 to mean 'default' (instead of omitting the field), unit confusion (thinking the unit is GB), or migrating configs where small values were previously tolerated.","solutions":["Set disk to at least 10, e.g. ephemeral_disk { disk = 100 }.","Omit the ephemeral_disk block to use the default size instead of setting 0 or a tiny value.","Clamp generated specs to a minimum of 10 MB before submission."],"exampleFix":"// before\nephemeral_disk {\n  disk = 5\n}\n// after\nephemeral_disk {\n  disk = 100\n}","handlingStrategy":"validation","validationCode":"if disk.SizeMB < 10 { return fmt.Errorf(\"ephemeral disk %d MB below minimum 10 MB\", disk.SizeMB) }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Omit ephemeral_disk to use defaults rather than setting 0","Remember the unit is MB, set at least 10 (typically 100+)","Clamp generated disk sizes to the 10 MB minimum"],"tags":["nomad","ephemeral-disk","resources","job-spec","validation"],"backgroundTag":"invalid-parameter-range","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}