0
  • cp failed at 11,328,692 KB / 802,322 files in a single directory

  • creation outside of this dir was still possible, as only 2% of the drive's inodes were used up

how do i properly format a drive to store up to 20 mil of ~15kb files in a single dir? i struggle to understand inodes/groups

source file system was originally created via an older kernel with:

Block size:               4096
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512

dest file system was created using "-b 1024" as the only flag for ext4 on Ubuntu 12.04:

Block size:               1024
Blocks per group:         8192
Fragments per group:      8192
Inodes per group:         512
Inode blocks per group:   128
  • Try on Serverfault. But, FWIW: `(TargetInodesPerGroup (512) * 4 = 2048) != SourceInodesPerGroup (8192)`... not sure it if applies, but everything else looks like a multiple of 4. –  Jun 03 '12 at 21:57

1 Answers1

1

you could actually specify your own number of inodes with -N

mkfs.ext4 -N 250000000 <device>

makes a file system with 250 million of them

Harald Brinkhof
  • 4,375
  • 1
  • 22
  • 32
  • the dest file system has 122 million and only 2% used up at the time of the error –  Jun 03 '12 at 22:10