We are creating a large backup ext3 partition on 16TB RAID array and the mke2fs took 2.5 hours to complete.
Are there any known tricks we can use to shorten this time?
The aim is to lower the time to get us back on our feet if a disaster strikes and we have to re-create that file system. I see options like lazy_bg and uninit_groups but they seem to be for ext4 file systems, which is not relevant for us yet.
Just in case you can consider using a different filesystem, this question piqued my interest so I benchmarked filesystem creation on a 200GB volume. The results:
200GB is quite a long way away from 16TB, but I think xfs is a safe bet for what you're looking for if you can opt for it. Also as a kind of rule of thumb I don't think you will be able to go much beyond ext4 creation speed with ext3 using special parameters, but I may be proven wrong by someone with more in-depth knowledge.
If you don't have a ton of tiny files (and I'm guessing with a 16 TB volume you probably don't), you can reduce the number of inodes, and that will dramatically speed up filesystem creation. The option is
-i (bytes)
, which takes a number of bytes as a parameter. For each (bytes), an inode will be created. I've had good luck with 4194304 (4 MB).I checked the e2fsprogs source code of CentOS 5, the 1.39-23 version of it support lazy_bg feature, although it is not list in manpage.
Got enough memory? Running 64 bit?
Considerations when creating ext3 filesystems has quite a few recommendations of how to optimise filesystem creation.