LFCS · Question #723
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. To create an ext3 filesystem on a device, you can either use mke2fs with the journaling option or directly specify ext3 as the type with the mkfs command.
Question
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
(47 responses)- A94% (44)
- C2% (1)
- D4% (2)
Why each option
To create an ext3 filesystem on a device, you can either use `mke2fs` with the journaling option or directly specify `ext3` as the type with the `mkfs` command.
The `mke2fs` command is used to create ext2/ext3/ext4 filesystems. The `-j` option specifically adds a journal to the filesystem, which is the defining characteristic of an ext3 filesystem.
The `mkfs` command is a generic front-end for various filesystem creation utilities. Using `mkfs -t ext3` explicitly instructs the system to create an ext3 filesystem on the specified device.
The `-c` option with `mkfs` (or `mke2fs`) performs a bad blocks check on the device before creating the filesystem; it does not specify the filesystem type.
There is no standard command named `mke3fs` in common Linux distributions; `mke2fs` is the correct utility for creating ext2, ext3, and ext4 filesystems.
Concept tested: Creating ext3 filesystems
Source: https://man7.org/linux/man-pages/man8/mke2fs.8.html
Topics
Community Discussion
No community discussion yet for this question.