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.

  • 2
    Would you consider using something different to ext3 if it speeded up the process significantly? – Eduardo Ivanec Apr 15 '11 at 0:41

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

  • Thanks. That's a good point. I expect it's relevant here since the file systems will contain large Bacula volume files. Reducing i-nodes numbers can also save some space. I'll pass it on to the team. – Amos Shapira Apr 16 '11 at 4:09

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:

    real    1m18.101s
    real    0m56.850s
    real    0m1.878s

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.

  • XFS takes about the same time to create on a 16TiB filesystem. It might be a bit longer, but it's not 8x times longer. – Daniel Lawson Apr 15 '11 at 21:04
  • Thanks. I keep hearing about XFS as a solution for many situations. I was bitten before when using other types of file systems which are less prevalent than ext3 (e.g. resizing tools weren't up to snuff) so I'd like to try to avoid switching over just for that. – Amos Shapira Apr 16 '11 at 4:08

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.