Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Manpage about mke2fs says "mke2fs creates 256-byte inodes by default". I've formatted my small (320MB) test partition with command:

sudo mkfs -t ext4 /dev/sdc1

The defaults for the mke2fs are below:

[defaults]
  base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr
  default_mntopts = acl,user_xattr
  enable_periodic_fsck = 0
  blocksize = 4096
  inode_size = 256
  inode_ratio = 16384

[fs_types]
...
  ext4 = {
           features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
           auto_64-bit_support = 1
           inode_size = 256
  }
...

Then I ran dumpe2fs and it showed me:

...
Inode size:           128
...

The program version is below:

dumpe2fs 1.42.8 (20-Jun-2013)
    Using EXT2FS Library version 1.42.8

Also, the superblock field s_inode_size = 128 (I read the superblock directly by pread64).

So, what would be the actual inode size in my case?

(I'm on Ubuntu 3.11, which runs as a guest VM in VMWare Fusion)

share|improve this question

1 Answer 1

As said with another related answer, you can't trust dumpe2fs in a mounted partition. It's very likely that it's erroneous or outdated. Unmount the partition and try again.

share|improve this answer
    
The partition is not mounted. But I think I should trust the superblock, don't I? And I've just tried tune2fs - it has shown me 128 as well. So, what the story about default size = 256? –  HEKTO Apr 3 at 17:03
1  
How shall the inode size be an outdated information? That doesn't make sense. Just that you were right in the other answer doesn't mean that any information from dumpe2fs on a mounted volume is unusable. –  Hauke Laging Apr 3 at 18:26
    
@HaukeLaging I'm not saying that "it is" but "it is very likely". Nor I'm saying that dumpe2fs is unusable, but that is not always correct. –  Braiam Apr 3 at 18:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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