1

I installed debian strech through the installer in a software raid 10 configuration.There are 4 drives, each is 14TB. Partition was formatted by the installer with ext4. The inode ratio defaults to 16384.

cat /proc/mdstat
Personalities : [raid10] [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] 
md3 : active raid10 sdc4[1] sda4[0] sdb4[2] sdd4[3]
      27326918656 blocks super 1.2 512K chunks 2 near-copies [4/4] [UUUU]
      bitmap: 5/204 pages [20KB], 65536KB chunk

md2 : active raid1 sdd3[3] sdc3[1] sda3[0] sdb3[2]
      976320 blocks super 1.2 [4/4] [UUUU]

md1 : active raid10 sdd2[3] sdc2[1] sda2[0] sdb2[2]
      15616000 blocks super 1.2 512K chunks 2 near-copies [4/4] [UUUU]

unused devices: 
mdadm --detail /dev/md3
/dev/md3:
        Version : 1.2
  Creation Time : Sun Mar  8 16:21:02 2020
     Raid Level : raid10
     Array Size : 27326918656 (26060.98 GiB 27982.76 GB)
  Used Dev Size : 13663459328 (13030.49 GiB 13991.38 GB)
   Raid Devices : 4
  Total Devices : 4
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Wed Apr  1 01:00:06 2020
          State : clean 
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

         Layout : near=2
     Chunk Size : 512K

           Name : aaaaaaa:2  (local to host aaaaaaa)
           UUID : xxxxxxxxxxxxxxxxxxxxxxxx
         Events : 26835

    Number   Major   Minor   RaidDevice State
       0       8        4        0      active sync set-A   /dev/sda4
       1       8       36        1      active sync set-B   /dev/sdc4
       2       8       20        2      active sync set-A   /dev/sdb4
       3       8       52        3      active sync set-B   /dev/sdd4

cat /etc/mke2fs.conf
[defaults]
        base_features = sparse_super,large_file,filetype,resize_inode,dir_index,ext_attr
        default_mntopts = acl,user_xattr
        enable_periodic_fsck = 0
        blocksize = 4096
        inode_size = 256
        inode_ratio = 16384

Now i run:

tune2fs -l /dev/md3
tune2fs 1.43.4 (31-Jan-2017)
Filesystem volume name:   
Last mounted on:          /
Filesystem UUID:          xxxxxxxxxxxxxxxxxxxxxxxxxxx
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              426983424
Block count:              6831729664
Reserved block count:     341586483
Free blocks:              6803907222
Free inodes:              426931027
First block:              0
Block size:               4096
Fragment size:            4096
Group descriptor size:    64
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         2048
Inode blocks per group:   128
RAID stride:              128
RAID stripe width:        256
Flex block group size:    16
Filesystem created:       Sun Mar  8 16:24:38 2020
Last mount time:          Tue Mar 31 12:06:30 2020
Last write time:          Tue Mar 31 12:06:21 2020
Mount count:              17
Maximum mount count:      -1
Last checked:             Sun Mar  8 16:24:38 2020
Check interval:           0 ()
Lifetime writes:          27 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      xxxxxxxxxxxxxxxxxxxxxxxxxxx
Journal backup:           inode blocks
Checksum type:            crc32c
Checksum:                 0x30808089

bytes-per-inode = (blocks/inodes) * block_size

In my case: bytes-per-inode = (6831729664/426983424) * 4096 = 16 * 4096 = 65536

Why is the ratio showing as 65536 in the tune2fs -l output. It should be 16384.

I have the same debian strech distribution installed on my notebook and there is no discrepancy between /etc/mke2fs.conf and tune2fs -l.

1 Answer 1

2

Your file system is over 16 TiB in size, so mke2fs defaulted to the “huge” file system type, with an inode ratio of 65,536 bytes. See the -T option in the linked manpage, and the huge type in mke2fs.conf:

        huge = {
                inode_ratio = 65536
        }

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .