Score:0

mkfs.ext4 -m -T options

in flag

How can I find out if I formatted the drive with

mkfs.ext4 -m 0 -T largefile4

or without specifying the options -m and -T

mkfs.ext4

In other words how can I see what is the -m reserved-blocks-percentage and -T usage-type of a formatted drive?

cn flag
Bob
IIRC with the [`dumpe2fs`](https://linux.die.net/man/8/dumpe2fs) command
Score:1
us flag

Execute as root:

dumpe2fs | less

There is a line Reserved block count, which tells how many blocks are reserved. Dividing Reserved block count by Block count gets you the percentage of reserved blocks.

The -T option selects which configuration to use from /etc/mke2fs.conf. The main setting that changes is the inode_ratio, which tells how much filesystem space one inode covers.

To get back to that number, one needs to do following steps:

  1. Get block device size by running df -k /path/to/filesystem.
  2. Take the value from 1K-blocks column and multiply by 1024.
  3. Run dumpe2fs /path/to/filesystem | grep "Inode count" to get the number of inodes on the filesystem.
  4. Divide the value from step 2 by the value from step 3.

The result is a number close to 4194304, which is the inode_ratio specified for largefile4 in mke2fs.conf, if the filesystem was created with largefile4 option.

ThomasHunter avatar
in flag
It returns: Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum Journal features: (none)
us flag
Sorry, I missed some points of the original question, I updated the answer.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.