1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

use tune2fs to disable ext4 mount counts and mount intervals

Signed-off-by: Marc Tamsky <mtamsky@gmail.com> (github: tamsky)
This commit is contained in:
Marc Tamsky 2014-09-05 19:32:39 -07:00
parent 6bc773b2c1
commit d229821501

View file

@ -306,6 +306,10 @@ func (devices *DeviceSet) createFilesystem(info *DevInfo) error {
if err != nil {
err = exec.Command("mkfs.ext4", append([]string{"-E", "nodiscard,lazy_itable_init=0"}, args...)...).Run()
}
if err != nil {
return err
}
err = exec.Command("tune2fs", append([]string{"-c", "-1", "-i", "0"}, devname)...).Run()
default:
err = fmt.Errorf("Unsupported filesystem type %s", devices.filesystem)
}