3

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.

Caleb
  • 11,583
  • 4
  • 35
  • 49
Amos Shapira
  • 839
  • 2
  • 11
  • 23

4 Answers4

7

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:

ext3:
    real    1m18.101s
ext4:
    real    0m56.850s
xfs:
    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.

Eduardo Ivanec
  • 14,531
  • 1
  • 35
  • 42
  • 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 04:08
6

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

BMDan
  • 7,129
  • 2
  • 22
  • 34
  • 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 04:09
0

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.

gnawux
  • 66
  • 4
0

Got enough memory? Running 64 bit?

Considerations when creating ext3 filesystems has quite a few recommendations of how to optimise filesystem creation.

petertonoli
  • 613
  • 3
  • 12