LX0-103 · Question #119
Which command will create an ext3 filesystem on /dev/hda2?
The correct answer is B. /sbin/mke2fs -j /dev/hda2. The mke2fs -j flag creates an ext3 filesystem by adding a journal to the standard ext2 structure, enabling crash recovery without a full fsck.
Question
Which command will create an ext3 filesystem on /dev/hda2?
Options
- A/sbin/mke2fs -d /dev/hda2
- B/sbin/mke2fs -j /dev/hda2
- C/sbin/mke2fs -m 3 /dev/hda2
- D/sbin/mke2fs -c ext3 /dev/hda2
How the community answered
(28 responses)- A4% (1)
- B89% (25)
- C7% (2)
Why each option
The mke2fs -j flag creates an ext3 filesystem by adding a journal to the standard ext2 structure, enabling crash recovery without a full fsck.
The -d flag specifies a directory whose contents are copied into the new filesystem root and has no effect on the filesystem type or journal creation.
The -j flag instructs mke2fs to create an ext2 filesystem and additionally allocate a journal inode, which is the single feature that distinguishes ext3 from ext2. The journal records filesystem changes before they are committed, allowing the kernel to replay or discard incomplete transactions after an unclean shutdown instead of scanning the entire filesystem.
The -m flag sets the percentage of blocks reserved for privileged processes and controls reserved space allocation, not the filesystem type.
The -c flag performs a read-only bad-block scan on the device before formatting and does not alter or specify the filesystem type.
Concept tested: Creating ext3 filesystem using mke2fs -j flag
Source: https://linux.die.net/man/8/mke2fs
Topics
Community Discussion
No community discussion yet for this question.