Merge pull request #7698 from tamsky/tune2fs_base_filesystem

use tune2fs to disable ext4 mount counts and mount intervals
This commit is contained in:
unclejack 2014-09-15 15:42:52 +03:00
commit a10a86d437
1 changed files with 4 additions and 0 deletions

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)
}