Change:
According to : While the is exactly the opposite. This significantly slows down large ext4 volume creation.
This might be worth bringing up at the storage f2f coming up.I am going to add to the agenda. This is an interesting approach to what I think may be a few larger issues. Questions and thoughts: What is a good SLO for mkfs? If the SLO is going to be violated due to size should k8s do something or should the user pre-format? There are tradeoffs for initting the filesystem lazy or not. Supporting all the options for a user may require an API change. Is this a persistent volume only thing?
I may miss something, but on a random GCE node with 500GiB magnetic(!) disk and Fedora 24 takes around 2 seconds. ext3 is a different story, it takes 74 seconds.
I cannot imagine any reason why anyone would be installing ext2/ext3 on a 500GB drive. If they do they should be expecting things to be slow. In any case knowing what the SLO is is still not a crazy idea.
This is probably not a big problem with GCE, since GCE PD's IOPS is per GB. This is mostly a problem for EBS/Cinder/Azure, since the IOPS per volume is fixed.
If we're going to do this at all, we should really think hard about this problem top-to-bottom. Ext3 vs ext4 vs other FS? Myriad filesystem options, etc.
I got bitten by this when implementing e2e tests for all supported storage class options on AWS. "Cold HDD" volume type has max. 250 IOPS and the smallest one is 500 GB. It takes 3-4 minutes just to format the volume, which slows down the test quite considerably. Was there any conclusion on f2f meeting? was in commit , which claims to be rewritten to Go. Original script not exist any more on the link above. Was there some smart idea in original ?
see some inconclusive investigation at
Please take a look at I encountered not only performance issue due to lazyitableinit=0, but also oom situations and thus killed processes. Due to the amount of data written to the disk, all free memory gets filled with dirty buffer cache.

Discussion:
FSCK=fsck.ext4 MOUNT_OPTIONS="discard,defaults" <del> MKFS="mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 -F" </del> <ins> MKFS="mkfs.ext4 -F" </ins> if [ -e /etc/redhat-release ]; then <del> if grep -q '6..' /etc/redhat-release; then # lazy_journal_init is not recognized in redhat 6 MKFS="mkfs.ext4 -E lazy_itable_init=0 -F" elif grep -q '7..' /etc/redhat-release; then </del> <ins> if grep -q '7..' /etc/redhat-release; then </ins> FSCK=fsck.xfs MKFS=mkfs.xfs fi

fstype = "ext4" } if fstype == "ext4" || fstype == "ext3" { <del> args = []string{"-E", "lazy_itable_init=0,lazy_journal_init=0", "-F", source} </del> <ins> args = []string{"-F", source} </ins> } glog.Infof("Disk %q appears to be unformatted, attempting to format as type: %q with options: %v", source, fstype, args) cmd := mounter.Runner.Command("mkfs."+fstype, args...)

execScripts: []ExecArgs{ {"fsck", []string{"-a", "/dev/foo"}, "", nil}, {"lsblk", []string{"-nd", "-o", "FSTYPE", "/dev/foo"}, "", nil}, <del> {"mkfs.ext4", []string{"-E", "lazy_itable_init=0,lazy_journal_init=0", "-F", "/dev/foo"}, "", fmt.Errorf("formatting failed")}, </del> <ins> {"mkfs.ext4", []string{"-F", "/dev/foo"}, "", fmt.Errorf("formatting failed")}, </ins> }, expectedError: fmt.Errorf("formatting failed"), },

execScripts: []ExecArgs{ {"fsck", []string{"-a", "/dev/foo"}, "", nil}, {"lsblk", []string{"-nd", "-o", "FSTYPE", "/dev/foo"}, "", nil}, <del> {"mkfs.ext4", []string{"-E", "lazy_itable_init=0,lazy_journal_init=0", "-F", "/dev/foo"}, "", nil}, </del> <ins> {"mkfs.ext4", []string{"-F", "/dev/foo"}, "", nil}, </ins> }, expectedError: fmt.Errorf("Still cannot mount"), },

execScripts: []ExecArgs{ {"fsck", []string{"-a", "/dev/foo"}, "", nil}, {"lsblk", []string{"-nd", "-o", "FSTYPE", "/dev/foo"}, "", nil}, <del> {"mkfs.ext4", []string{"-E", "lazy_itable_init=0,lazy_journal_init=0", "-F", "/dev/foo"}, "", nil}, </del> <ins> {"mkfs.ext4", []string{"-F", "/dev/foo"}, "", nil}, </ins> }, expectedError: nil, },

execScripts: []ExecArgs{ {"fsck", []string{"-a", "/dev/foo"}, "", nil}, {"lsblk", []string{"-nd", "-o", "FSTYPE", "/dev/foo"}, "", nil}, <del> {"mkfs.ext3", []string{"-E", "lazy_itable_init=0,lazy_journal_init=0", "-F", "/dev/foo"}, "", nil}, </del> <ins> {"mkfs.ext3", []string{"-F", "/dev/foo"}, "", nil}, </ins> }, expectedError: nil, },

# Format only if the disk is not already formatted. if ! tune2fs -l "${device}" ; then echo "Formatting '${device}'" <del> mkfs.ext4 -F -E lazy_itable_init=0,lazy_journal_init=0,discard "${device}" </del> <ins> mkfs.ext4 -F "${device}" </ins> fi mkdir -p "${mountpoint}"