LX0-103 · Question #123
Which of the following commands creates an ext3 filesystem on /dev/sdb1? (Choose TWO correct answers.)
The correct answer is A. /sbin/mke2fs -j /dev/sdb1 B. /sbin/mkfs -t ext3 /dev/sdb1. An ext3 filesystem can be created with 'mke2fs -j' (adds a journal to ext2 to produce ext3) or 'mkfs -t ext3' (invokes the correct backend via the type flag).
Question
Which of the following commands creates an ext3 filesystem on /dev/sdb1? (Choose TWO correct answers.)
Options
- A/sbin/mke2fs -j /dev/sdb1
- B/sbin/mkfs -t ext3 /dev/sdb1
- C/sbin/mkfs -c ext3 /dev/sdb1
- D/sbin/mke3fs -j /dev/sdb1
How the community answered
(37 responses)- A86% (32)
- C5% (2)
- D8% (3)
Why each option
An ext3 filesystem can be created with 'mke2fs -j' (adds a journal to ext2 to produce ext3) or 'mkfs -t ext3' (invokes the correct backend via the type flag).
The 'mke2fs -j' command creates an ext3 filesystem by building an ext2 filesystem and then adding a journal data structure via the '-j' flag - the journal being the defining feature that distinguishes ext3 from ext2.
The 'mkfs -t ext3 /dev/sdb1' command explicitly specifies the filesystem type with '-t ext3', causing the mkfs front-end to invoke mke2fs with the appropriate options to produce an ext3 filesystem.
In mkfs, the '-c' option triggers a bad-block check on the device before formatting; it is not used to specify the filesystem type, which requires the '-t' flag.
'mke3fs' does not exist as a Linux command; ext3 filesystem creation is handled entirely by 'mke2fs -j' and there is no separate mke3fs utility.
Concept tested: Creating ext3 filesystem using mke2fs and mkfs commands
Source: https://man7.org/linux/man-pages/man8/mke2fs.8.html
Topics
Community Discussion
No community discussion yet for this question.