+ if self.fstype == "ext4":
+ cmd = "/sbin/mkfs.ext4 -F "
+ if partitionsize > 2 * 1024 * 1024: # 2GB
+ cmd += "-T largefile "
+ cmd += "-O extent,flex_bg,large_file,uninit_bg -m1 " + fulldevicename
+ elif self.fstype == "ext3":
+ cmd = "/sbin/mkfs.ext3 -F "
+ if partitionsize > 2 * 1024 * 1024:
+ cmd += "-T largefile "
+ cmd += "-m0 " + fulldevicename
+ elif self.fstype == "ext2":
+ cmd = "/sbin/mkfs.ext2 -F "
+ if partitionsize > 2 * 1024 * 1024:
+ cmd += "-T largefile "
+ cmd += "-m0 " + fulldevicename
+ elif self.fstype == "vfat":
+ if partitionsize > 4 * 1024 * 1024 * 1024:
+ cmd = "/usr/sbin/mkfs.vfat -I -S4096 " + fulldevicename
+ else:
+ cmd = "/usr/sbin/mkfs.vfat -I " + fulldevicename