nerdexam
CompTIA

XK0-004 · Question #453

A Linux administrator mounts a directory to a Linux workstation by executing the command mount -t ext4 /dev/sdb /mnt /leg. After rebooting the workstation the mounted device is missing. Which of the…

The correct answer is A. echo "/dev/adb /ant/log ext4 defaults 0 0" ?/etc/fstab. Mounts created with the mount command are temporary and disappear after reboot - adding an entry to /etc/fstab makes them persistent.

System Management

Question

A Linux administrator mounts a directory to a Linux workstation by executing the command mount -t ext4 /dev/sdb /mnt /leg. After rebooting the workstation the mounted device is missing. Which of the following commands should it is mounted after reboot?

Options

  • Aecho "/dev/adb /ant/log ext4 defaults 0 0" ?/etc/fstab
  • Bfsck /dev/sdb
  • CIvchange --activate /dev/aab
  • Dmkfs.txt4 /dev/sdb

How the community answered

(58 responses)
  • A
    93% (54)
  • B
    3% (2)
  • C
    2% (1)
  • D
    2% (1)

Why each option

Mounts created with the mount command are temporary and disappear after reboot - adding an entry to /etc/fstab makes them persistent.

Aecho "/dev/adb /ant/log ext4 defaults 0 0" ?/etc/fstabCorrect

The /etc/fstab file is read by the system at boot time to mount filesystems automatically. Adding the line '/dev/sdb /mnt/log ext4 defaults 0 0' to /etc/fstab specifies the device, mount point, filesystem type, options, and fsck pass order, ensuring the device is mounted every time the system starts.

Bfsck /dev/sdb

fsck is a filesystem check and repair utility used to verify and correct filesystem integrity errors, not to configure persistent mounts.

CIvchange --activate /dev/aab

lvchange --activate is an LVM command used to activate a logical volume in a volume group, which is unrelated to configuring a persistent ext4 mount.

Dmkfs.txt4 /dev/sdb

mkfs.ext4 creates a new ext4 filesystem on a device, which would erase all existing data on /dev/sdb and does not configure persistent mounting.

Concept tested: Persistent mounts via /etc/fstab configuration

Source: https://man7.org/linux/man-pages/man5/fstab.5.html

Topics

#fstab#persistent mount#filesystem configuration#ext4

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice