hashicorp/nomad · error

minimum DiskMB value is 10; got %d

Error message

minimum DiskMB value is 10; got %d

What it means

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.

Source

Thrown at nomad/structs/structs.go:10434

func (d *EphemeralDisk) Equal(o *EphemeralDisk) bool {
	if d == nil || o == nil {
		return d == o
	}
	switch {
	case d.Sticky != o.Sticky:
		return false
	case d.SizeMB != o.SizeMB:
		return false
	case d.Migrate != o.Migrate:
		return false
	}
	return true
}

// Validate validates EphemeralDisk
func (d *EphemeralDisk) Validate() error {
	if d.SizeMB < 10 {
		return fmt.Errorf("minimum DiskMB value is 10; got %d", d.SizeMB)
	}
	return nil
}

// Copy copies the EphemeralDisk struct and returns a new one
func (d *EphemeralDisk) Copy() *EphemeralDisk {
	ld := new(EphemeralDisk)
	*ld = *d
	return ld
}

var (
	// VaultUnrecoverableError matches unrecoverable errors returned by a Vault
	// server
	VaultUnrecoverableError = regexp.MustCompile(`Code:\s+40(0|3|4)`)
)

const (

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Set disk to at least 10, e.g. ephemeral_disk { disk = 100 }.
  2. Omit the ephemeral_disk block to use the default size instead of setting 0 or a tiny value.
  3. Clamp generated specs to a minimum of 10 MB before submission.

Example fix

// before
ephemeral_disk {
  disk = 5
}
// after
ephemeral_disk {
  disk = 100
}
Defensive patterns

Strategy: validation

Validate before calling

if disk.SizeMB < 10 { return fmt.Errorf("ephemeral disk %d MB below minimum 10 MB", disk.SizeMB) }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04). Data as JSON: /api/errors/fb290f6275de14f4. Report an issue: GitHub.