Nomad automatically reserves 300MB of disk space if nothing is stated at “EphemeralDisk” stanza. however the lowest the job will run with is 100mb.
i am trying to force nomad to reserve for the task around 10mb at most. preferably even less as i have a hundred different little jobs running.
any advice on this would be much appreciated
Hi @maxim-design,
Nomad’s internal validation logic requires the minimum size be 10MB, therefore you should be able to set the following example within your group without trouble:
ephemeral_disk {
size = 10
}
Thanks,
jrasell and the Nomad team
hi @jrasell
thanks a lot for the answer.
what version on nomad supports this ?
Hi @maxim-design,
A quick look into the code shows this has been available from at least v0.5.0.
Thanks,
jrasell and the Nomad team
hey @jrasell
so after much experimentation I figured out why it was not working for me.
the EphemeralDisk stanza will not allow disk reservation of less then 100MB unless you also define (under task) logs config to be max_files * max_size = less then 100MB.
that is because logs default configuration is 10 files 10MB each and that forces a minimum of 100MB disk space reservation.
here is an example that worked for me:
group " somegroup" {
ephemeral_disk {
size = 10
}
Task “sometask” {
logs {
max_files = 3
max_file_size = 3
}
}
disk reserved for the task is 10MB 
thank you very much.