2

I'm formatting a disk with following command switches, I can format the disk to ext4.

sudo mke2fs -F -E lazy_itable_init=0,lazy_journal_init=0,discard -t ext4 -b 4096 ...

However, once I added this switch:

-O ^has_journal

It will be formatted to ext2. Could you explain why?

0

Because ext4 is an extension of the ext2 and ext3 filesystems; one of the features that it extended was the use of a journal.

References:

  • So, you are saying, by disabling the journal feature, I'm installing a subset of ext4, that is why it is only shown as ext2? What I really want to know is, does this volume have all other advantages from ext4. Thanks! – Archer Apr 13 '16 at 0:57
  • I can't speak to the details of ext4, but I suspect that is why it's displaying as ext2 -- without a journal, it can't be called ext4. See also man mkfs.ext4 where it says: and "mke2fs -t ext3 -O ^has_journal /dev/hdXX" will create a filesystem that does not have a journal and hence will not be supported by the ext3 filesystem code in the Linux kernel.)" – Jeff Schaller Apr 13 '16 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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