Courseiva

CCNA Storage Management Questions

72 questions · Storage Management · All types, answers revealed

1
MCQhard

A storage administrator wants to create a software RAID 10 (1+0) array using six disks. Which mdadm command is appropriate?

A.mdadm --create /dev/md0 --level=10 --raid-devices=6 /dev/sda /dev/sdb /dev/sdc
B.mdadm --create /dev/md0 --level=10 --raid-devices=6 /dev/sd[abcdef]
C.mdadm --create /dev/md0 --level=1 --raid-devices=6 --chunk=64 /dev/sd[abcdef]
D.mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/sda /dev/sdb /dev/sdc /dev/sdd
AnswerB

`--level=10` builds a striped mirror set, and `--raid-devices=6` declares all six member disks, satisfying the stem's RAID 1+0 over six disks constraint. The brace expansion `/dev/sd[abcdef]` supplies exactly six devices, so mdadm creates `/dev/md0` without prompting for missing members.

Why this answer

It uses the proper mdadm syntax to create a RAID 10 array with six disks. The --level=10 specifies RAID 10 (a striped mirror set), and --raid-devices=6 matches the number of disks provided via the /dev/sd[abcdef] glob, which expands to /dev/sda through /dev/sdf. This command correctly creates a RAID 10 array that combines striping and mirroring across all six devices.

Exam trap

The trap here is that candidates often confuse the required number of disks for RAID 10 (thinking any even number works, but the command must match --raid-devices to the actual device count) or mistakenly use RAID 1 (--level=1) when the question explicitly asks for RAID 10, leading them to pick option C.

How to eliminate wrong answers

Option A is wrong because it only lists three disks (/dev/sda, /dev/sdb, /dev/sdc) but specifies --raid-devices=6, which will cause mdadm to fail or prompt for missing devices; RAID 10 requires an even number of disks (at least 4) and the count must match the provided devices. Option C is wrong because it uses --level=1 (RAID 1, pure mirroring) instead of --level=10, and RAID 1 with six disks would create a single mirrored set, not the striped mirror of RAID 10; the --chunk=64 option is irrelevant for RAID 1. Option D is wrong because it specifies --raid-devices=4 but lists four disks, which would create a valid RAID 10 array but with only four disks, not the six disks required by the question.

2
Multi-Selecthard

A Linux server uses a software RAID1 array /dev/md0 assembled from /dev/sdb1 and /dev/sdc1. The administrator wants to replace the failing disk /dev/sdc with a new disk /dev/sdd without losing data or interrupting service. Which two steps are required to correctly replace the disk in the array? (Choose two.)

Select 2 answers
A.Mark /dev/sdc1 as failed with mdadm /dev/md0 --fail /dev/sdc1, then remove it with mdadm /dev/md0 --remove /dev/sdc1.
B.Recreate the array with mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdd1.
C.Run mdadm --grow /dev/md0 --raid-devices=2 to resize the array after adding the new disk.
D.Use dmsetup remove /dev/md0 to detach the array, then re-add the new disk.
E.Add the new disk to the array with mdadm /dev/md0 --add /dev/sdd1, then monitor rebuild with cat /proc/mdstat.
AnswersA, E

Before physically removing a disk from a RAID array, it must be marked as failed and then removed from the array metadata. mdadm --fail tells the kernel to stop using the device, and --remove detaches it from the array. This ensures the array does not attempt to read from or write to the disk being replaced, preventing errors and data inconsistency.

Why this answer

To replace a disk in a RAID1 array, the failed disk must first be marked failed and removed from the array. Then the new disk, partitioned identically, is added with mdadm --add, which triggers a rebuild. These two steps maintain data integrity and restore redundancy without recreating or resizing the array.

Exam trap

The trap here is thinking that a new disk can simply be plugged in and will automatically join the array, or that the array must be recreated, when in fact explicit fail/remove/add steps are required.

3
MCQmedium

An administrator manages a server whose /home directory resides on the logical volume /dev/vg_users/lv_home. Usage reports show the LV is 98% full, and the volume group vg_users has 40 GB of free extents. The filesystem is ext4. Which sequence correctly expands the usable space to /home?

A.resize2fs /dev/vg_users/lv_home 20G && lvextend -L +20G /dev/vg_users/lv_home
B.lvextend -L +20G /dev/vg_users/lv_home && xfs_growfs /home
C.vgextend vg_users /dev/vg_users/lv_home && resize2fs /dev/vg_users/lv_home
D.lvextend -L +20G /dev/vg_users/lv_home && resize2fs /dev/vg_users/lv_home
AnswerD

lvextend grows the logical volume by 20 GB using free extents in the volume group, then resize2fs expands the ext4 filesystem to fill the larger LV. This is the standard two-step procedure for ext4 on LVM. The filesystem can be mounted during the operation, so no downtime is required for /home.

Why this answer

Extending an ext4 filesystem on LVM requires enlarging the logical volume first with lvextend, then expanding the filesystem with resize2fs. The volume group already has free extents, so no additional physical volume is needed. The filesystem can be resized online while /home remains mounted.

Exam trap

The trap here is mixing filesystem-specific growth tools, using xfs_growfs for an ext4 filesystem or reversing the order of LV and filesystem expansion.

4
Multi-Selecthard

An administrator is configuring a new server with two 1 TiB NVMe disks, /dev/nvme0n1 and /dev/nvme1n1, and wants to use LVM to create a single logical volume that spans both disks for a database. The volume group will be named vg_db and the logical volume lv_db. Which two commands are required to initialize the disks for LVM and create the volume group? (Choose two.)

Select 2 answers
A.lvcreate -L 2T -n lv_db vg_db
B.mkfs.ext4 /dev/nvme0n1 /dev/nvme1n1
C.pvcreate /dev/nvme0n1 /dev/nvme1n1
D.vgcreate vg_db /dev/nvme0n1 /dev/nvme1n1
E.vgextend vg_db /dev/nvme1n1
AnswersC, D

pvcreate initializes the specified block devices as LVM physical volumes. This is the first step before creating a volume group. It writes LVM metadata to the disks, allowing them to be used in a volume group. This command correctly initializes both NVMe disks for LVM.

Why this answer

To prepare the disks and create the volume group, the administrator must first initialize the disks as physical volumes with pvcreate, then create the volume group with vgcreate, adding both physical volumes. lvcreate is a later step for creating the logical volume, mkfs.ext4 would destroy LVM metadata, and vgextend applies only to existing volume groups. The two required commands are pvcreate and vgcreate.

Exam trap

The trap here is confusing the order of LVM operations, such as trying to extend a volume group that has not been created or formatting disks before LVM initialization.

5
MCQeasy

A system administrator is setting up a high-availability cluster using shared storage. Which filesystem is best suited for this environment where multiple nodes need simultaneous read-write access to the same filesystem?

A.Btrfs
B.GFS2
C.XFS
D.ext4
AnswerB

GFS2 is a clustered filesystem using distributed locking through a lock manager, letting multiple nodes mount and write to the same shared device concurrently. This satisfies the simultaneous read-write access constraint, unlike single-node filesystems such as ext4 or XFS.

Why this answer

GFS2 (Global File System 2) is a shared-disk cluster filesystem designed for high-availability environments where multiple nodes require simultaneous read-write access to the same filesystem. It uses a distributed lock manager (DLM) to coordinate access across nodes, ensuring data consistency without requiring a single metadata server. This makes it ideal for active-active cluster configurations with shared block storage.

Exam trap

The trap here is that candidates often confuse a filesystem's ability to be mounted on multiple nodes (e.g., via NFS) with true cluster-aware filesystem support, or they assume that any journaling filesystem like XFS or ext4 can be used on shared storage without a distributed lock manager.

How to eliminate wrong answers

Option A (Btrfs) is wrong because it is a copy-on-write filesystem designed for single-node use with features like snapshots and checksums, but it lacks a distributed lock manager and cannot coordinate concurrent read-write access from multiple nodes. Option C (XFS) is wrong because it is a high-performance 64-bit journaling filesystem for single-node environments; while it supports large files and parallel I/O, it does not have cluster-aware locking mechanisms. Option D (ext4) is wrong because it is a general-purpose journaling filesystem for single hosts and provides no support for shared storage or multi-node concurrent access, making it unsuitable for cluster filesystems.

6
Multi-Selectmedium

Which TWO of the following are valid ways to mount a filesystem with the 'noexec' option to prevent execution of binaries?

Select 2 answers
A.mount -o noexec /dev/sdb1 /mnt/data
B.Add 'exec' to the fourth field of /etc/fstab for the entry.
C.Add 'defaults' to the fourth field of /etc/fstab for the entry.
D.mount --bind /mnt/data1 /mnt/data2
E.Add 'noexec' to the fourth field of /etc/fstab for the entry.
AnswersA, E

The mount command's -o flag passes the noexec mount option alongside the device and target directory, applying it for that mount session. This satisfies the requirement to mount a filesystem with binary execution disabled without editing persistent configuration.

Why this answer

Option A is correct because the mount command's -o flag accepts the noexec mount option directly, so 'mount -o noexec /dev/sdb1 /mnt/data' mounts the device /dev/sdb1 at /mnt/data with binary execution disabled. Option E is correct because the fourth field of an /etc/fstab entry holds the mount options, so adding 'noexec' there (e.g., 'defaults,noexec') makes the filesystem mount with noexec persistently at boot or on 'mount -a'. Option B is wrong because 'exec' is the opposite of noexec and explicitly permits execution.

Option C is wrong because 'defaults' expands to rw,suid,dev,exec,auto,nouser,async, which includes exec and thus allows binaries to run. Option D is wrong because 'mount --bind' merely mirrors one directory tree onto another and does not itself set the noexec option.

Exam trap

The trap here is that candidates often confuse the 'defaults' option in fstab with a safe or neutral setting, not realizing that 'defaults' implicitly includes 'exec', so they incorrectly select option C as a valid way to prevent execution.

7
MCQmedium

A system administrator is setting up a new backup server. The server has two 4TB disks /dev/sda and /dev/sdb. The administrator decides to create a RAID1 array and then an LVM volume group on top of the RAID device. After creating the RAID1 array /dev/md0, they create a physical volume, volume group named vg_backup, and a logical volume lv_data of size 2TB. Then they format with ext4 and mount at /backup. During testing, they realize that the backup data volume will likely exceed 2TB eventually. They want to expand the filesystem to use all available space in the RAID array. What is the correct procedure?

A.lvextend -l +100%FREE /dev/vg_backup/lv_data, resize2fs /dev/vg_backup/lv_data.
B.Unmount /backup, lvextend -l +100%FREE /dev/vg_backup/lv_data, resize2fs /dev/vg_backup/lv_data, mount /backup.
C.Create a new logical volume and mount it separately.
D.Add new disk to RAID array, then extend LVM.
AnswerA

Extending the logical volume with `lvextend -l +100%FREE` consumes all remaining free extents in vg_backup, which sits on the 4TB RAID1 array, so the LV grows to roughly 4TB. `resize2fs` then expands the ext4 filesystem online to match, satisfying the requirement to use all available space.

Why this answer

The correct procedure is to extend the logical volume to use all remaining free space in the volume group with lvextend -l +100%FREE, then resize the ext4 filesystem online with resize2fs. Since ext4 supports online resizing, unmounting is not required.

Exam trap

LFCS often tests whether candidates know that ext4 can be resized online, so they might incorrectly choose to unmount first, which is unnecessary and causes downtime.

How to eliminate wrong answers

Option B is wrong because it includes unmounting the filesystem, which is unnecessary for ext4 online resizing and would cause downtime. Option C is wrong because creating a new logical volume and mounting it separately does not expand the existing filesystem to use all available space in the RAID array; it adds a separate volume, which may not be desired. Option D is wrong because adding a new disk to the RAID array is not needed; the RAID array already has free space (since the LV is only 2TB on a 4TB RAID1), and the goal is to expand the existing LV, not add more physical capacity.

8
MCQmedium

An administrator has added a new disk (/dev/sdb) to a Linux system. The disk is to be used as a physical volume in an existing volume group 'vg_data'. Which sequence of commands should be executed to make the disk available to the volume group?

A.fdisk /dev/sdb; pvcreate /dev/sdb; vgextend vg_data /dev/sdb
B.pvcreate /dev/sdb; vgextend vg_data /dev/sdb
C.pvcreate /dev/sdb; vgcreate vg_data /dev/sdb
D.vgcreate /dev/sdb; vgextend vg_data /dev/sdb
AnswerB

pvcreate initialises /dev/sdb as an LVM physical volume, writing the metadata header LVM requires before any volume group can claim it. vgextend then adds that PV to the existing vg_data, extending its capacity without recreating the group or disturbing existing logical volumes.

Why this answer

It first initializes the disk as a physical volume using `pvcreate`, which writes LVM metadata to /dev/sdb, and then extends the existing volume group 'vg_data' with `vgextend`, adding the new PV to the VG. This is the standard two-step process for adding a new disk to an existing LVM volume group.

Exam trap

The trap here is that candidates may think partitioning (fdisk) is required before LVM operations, or confuse `vgcreate` (which creates a new VG) with `vgextend` (which adds to an existing VG), leading them to pick options that either perform unnecessary steps or use the wrong command for the task.

How to eliminate wrong answers

Option A is wrong because `fdisk /dev/sdb` is unnecessary and potentially harmful; LVM does not require partitioning for a PV (though partitions can be used), and running fdisk without creating a partition would leave the disk without a filesystem table, but the real issue is that `pvcreate` would then fail if the disk has a partition table or the command sequence is redundant. Option C is wrong because `vgcreate` creates a new volume group, but the question specifies the disk should be added to an *existing* volume group 'vg_data', so using `vgcreate` would either fail (if 'vg_data' already exists) or create a second VG with the same name, which is incorrect. Option D is wrong because `vgcreate` is used to create a new VG, not to add a disk to an existing one, and the order is reversed: `pvcreate` must precede `vgextend`; running `vgcreate /dev/sdb` is syntactically invalid as `vgcreate` expects a VG name followed by PVs, not a device path.

9
MCQeasy

An administrator needs to check the UUID of a filesystem on /dev/sdb1. Which command should be used?

A.df -h /dev/sdb1
B.mount | grep sdb1
C.blkid /dev/sdb1
D.fdisk -l /dev/sdb1
AnswerC

`blkid /dev/sdb1` queries the block device directly, reading the filesystem superblock to report its UUID, TYPE and LABEL. It satisfies the stem's requirement to check the UUID of a specific partition without mounting it, and works regardless of whether the device is currently mounted.

Why this answer

The `blkid` command is specifically designed to locate and display block device attributes, including the UUID and filesystem type. Running `blkid /dev/sdb1` queries the device's superblock and outputs its UUID, making it the correct tool for this task.

Exam trap

The trap here is that candidates confuse `blkid` with `fdisk -l` or `df -h`, assuming those commands also display filesystem UUIDs, but only `blkid` (or `lsblk -f`) directly queries the superblock for this attribute.

How to eliminate wrong answers

Option A is wrong because `df -h` shows disk usage and mount points, not UUIDs; it reads from the mounted filesystem table, not the raw device superblock. Option B is wrong because `mount | grep sdb1` lists only current mount information (device, mount point, filesystem type, options) and does not display UUIDs. Option D is wrong because `fdisk -l` displays partition table geometry and partition types (e.g., Linux filesystem), but it does not show the UUID of the filesystem within the partition.

10
MCQmedium

A file server has an XFS filesystem on /dev/vg_data/lv_share that is nearly full. The volume group has 50 GB of free space. The administrator runs lvextend -L +20G /dev/vg_data/lv_share, which succeeds. However, df -h still reports the original size. What should the administrator do next to make the additional space usable?

A.Run partprobe /dev/vg_data/lv_share to make the kernel reread the partition table.
B.Run resize2fs /dev/vg_data/lv_share to expand the filesystem to the new size.
C.Run xfs_growfs /mountpoint, where /mountpoint is the current mount point of the filesystem.
D.Unmount the filesystem, run lvresize --resizefs /dev/vg_data/lv_share, then remount it.
AnswerC

XFS requires an explicit grow operation after the underlying block device is enlarged. xfs_growfs is run against the mount point (not the device) and expands the filesystem to fill the available space on the logical volume. This is the correct next step because lvextend only resized the LV, leaving the XFS filesystem at its old size.

Why this answer

After extending an LV that hosts an XFS filesystem, the filesystem itself must be grown separately. The XFS-specific tool is xfs_growfs, which is invoked with the mount point and can be run while the filesystem is mounted. This expands the filesystem to use the additional space, after which df will show the new size.

Exam trap

The trap here is assuming that lvextend automatically grows the filesystem, when in fact it only resizes the logical volume and a separate filesystem-specific step is needed.

11
MCQmedium

An administrator needs to configure software RAID 5 on three disks /dev/sda, /dev/sdb, /dev/sdc with a spare disk /dev/sdd. Which command correctly creates the RAID array?

A.mdadm --create /dev/md0 --level=5 --raid-devices=3 --spare-devices=1 /dev/sda /dev/sdb /dev/sdc /dev/sdd
B.mdadm --create /dev/md0 --level=5 --raid-devices=4 /dev/sda /dev/sdb /dev/sdc /dev/sdd
C.mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sda /dev/sdb /dev/sdc
D.mdadm --create /dev/md0 --level=5 --raid-devices=3 --spare-devices=1 /dev/sda /dev/sdb /dev/sdc --spare /dev/sdd
AnswerA

The `--level=5` flag sets RAID 5 parity striping across three active members, while `--raid-devices=3` fixes the array's active disk count and `--spare-devices=1` designates /dev/sdd as a hot spare. Listing all four devices in order satisfies the stem's requirement for a three-disk RAID 5 array with one standby disk.

Why this answer

It uses the `--spare-devices=1` flag to designate `/dev/sdd` as a hot spare, while `--raid-devices=3` specifies that only three disks form the active RAID 5 array. The spare disk is listed after the active disks, which is the correct syntax for `mdadm --create`.

Exam trap

The trap here is that candidates often confuse `--raid-devices` with the total number of disks provided, leading them to set `--raid-devices=4` (option B) when they intend to include a spare, or they forget to specify the spare at all (option C).

How to eliminate wrong answers

Option B is wrong because `--raid-devices=4` tells mdadm to use all four disks as active members of the RAID 5 array, leaving no spare disk; this creates a four-disk RAID 5 instead of a three-disk RAID 5 with a spare. Option C is wrong because it omits the spare disk entirely, so `/dev/sdd` is not included in the command and no spare is configured. Option D is wrong because it incorrectly uses both `--spare-devices=1` and a separate `--spare` flag, which is redundant and syntactically invalid; mdadm expects the spare devices to be listed after the active devices, not with a separate `--spare` option.

12
Multi-Selecteasy

A system administrator needs to identify all available block devices on a Linux server. Which two commands can be used to accomplish this? (Choose two.)

Select 2 answers
A.blkid
B.mount
C.lsblk
D.df -h
E.fdisk -l
AnswersC, E

`lsblk` reads sysfs to list all block devices, showing disks, partitions, and their mountpoints in a tree. This directly satisfies the requirement to identify every available block device, including unmounted ones that filesystem-oriented tools would miss.

Why this answer

lsblk (C) is correct because it reads /sys/block and udev data to list all block devices in a tree view, showing disks, partitions, and their sizes, types, and mountpoints regardless of whether they are mounted. fdisk -l (E) is correct because it enumerates every block device in /proc/partitions and prints the partition table of each disk, making it a standard way to discover all available block devices. blkid (A) only reports devices that already have a filesystem or swap signature and their UUID/LABEL, so it misses unformatted or otherwise unrecognized block devices. mount (B) shows only currently mounted filesystems, not all block devices. df -h (D) reports disk space usage of mounted filesystems only, so it also fails to reveal unmounted or unformatted block devices.

Exam trap

The trap here is that candidates often confuse `blkid` with `lsblk` because of similar names, but `blkid` only shows devices with filesystem metadata, not all block devices, making it incomplete for this task.

13
MCQmedium

A system administrator notices that a new 500GB SSD (/dev/sdb) is not being recognized by the system after installation. The server uses UEFI and GPT partitioning. Which command should the administrator run first to verify that the disk is detected by the kernel?

A.fdisk -l /dev/sdb
B.lsblk
C.cat /proc/cpuinfo
D.lsusb
AnswerB

lsblk reads /sys/block and udev data to list all block devices the kernel currently recognises, so it immediately confirms whether /dev/sdb was detected after installation without altering anything. This satisfies the stem's requirement to verify kernel-level disk detection first.

Why this answer

The `lsblk` command lists all block devices recognized by the kernel, including those without a filesystem or partition table. Since the disk is new and not yet partitioned, `lsblk` will show it if the kernel has detected it, making it the correct first diagnostic step.

Exam trap

The trap here is that candidates often jump to `fdisk -l` as the first command, but it requires the device to already be recognized and may produce misleading errors if the disk is not detected, whereas `lsblk` directly shows kernel-level recognition without needing a partition table.

How to eliminate wrong answers

Option A is wrong because `fdisk -l /dev/sdb` will fail or show an error if the disk is not detected by the kernel, and it requires the device node to exist; it is not a reliable first check for kernel detection. Option C is wrong because `cat /proc/cpuinfo` displays CPU information, not storage device detection. Option D is wrong because `lsusb` lists USB devices only, and a 500GB SSD is likely connected via SATA or NVMe, not USB.

14
MCQeasy

A junior administrator needs to mount an ISO image located at /opt/images/install.iso to the directory /mnt/iso without burning it to a physical disc. Which command should be used?

A.losetup /dev/loop0 /opt/images/install.iso && mount /dev/loop0 /mnt/iso
B.mount --bind /opt/images/install.iso /mnt/iso
C.mount -o loop /opt/images/install.iso /mnt/iso
D.mount -t iso9660 /opt/images/install.iso /mnt/iso
AnswerC

The loop option tells mount to associate the ISO file with a loop device, making it accessible as a block device, and then mount it at the specified directory. This is the standard method for accessing ISO images without physical media. The directory /mnt/iso must already exist before running the command.

Why this answer

Mounting an ISO file requires the loop option so the kernel can treat the file as a block device and read its ISO9660 filesystem. The mount -o loop command is the simplest and most common way to achieve this. Alternatives like specifying only the filesystem type or using a bind mount do not correctly expose the ISO's contents.

Exam trap

The trap here is thinking that specifying the iso9660 filesystem type is sufficient to mount an ISO file, when the loop option is the critical piece that associates the file with a loop device.

15
MCQhard

An administrator is preparing a new server that will use software RAID 1 for the root filesystem. The system has two identical 500 GB disks, /dev/sda and /dev/sdb. The administrator wants to create the RAID array and then place LVM on top of it. Which command correctly creates the RAID 1 array using the entire disks?

A.mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sda /dev/sdb
B.mdadm --assemble /dev/md0 /dev/sda /dev/sdb
C.mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
D.mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda /dev/sdb
AnswerD

mdadm --create with --level=1 and --raid-devices=2 creates a RAID 1 array named /dev/md0 using the two specified disks. This is the correct syntax to initialize a mirrored array on whole disks. After creation, the administrator can create LVM physical volumes on /dev/md0 and proceed with volume group and logical volume setup.

Why this answer

Creating a RAID 1 array on whole disks requires mdadm --create with --level=1 and --raid-devices=2, followed by the device paths. RAID 1 provides mirroring for redundancy. Using --level=0 would create a stripe with no redundancy, and --assemble is only for activating existing arrays.

The correct device paths are the whole disks, not partitions.

Exam trap

The trap here is mixing up mdadm --create with mdadm --assemble, or specifying the wrong RAID level for the required redundancy.

16
MCQhard

An administrator has a volume group vg_data with 50 GB of free extents. The logical volume /dev/vg_data/lv_archive is 200 GB and must grow to 350 GB. The administrator runs lvextend -L +150G /dev/vg_data/lv_archive and it fails. Which is the most likely cause?

A.The volume group does not have enough free extents to satisfy the 150 GB request.
B.The logical volume is formatted with XFS, which cannot be extended with lvextend.
C.The +150G syntax is invalid and should be --size 150G instead.
D.The filesystem must be unmounted before any logical volume can be extended.
AnswerA

lvextend can only allocate from unallocated physical extents in the volume group. With just 50 GB free, a request for 150 GB of additional space cannot be satisfied, so the command fails before any resizing occurs. The administrator must first add a physical volume with vgextend.

Why this answer

lvextend allocates physical extents from the volume group's free pool. With only 50 GB free, a 150 GB growth request cannot be met, so the command exits with an error before touching the logical volume. The fix is to add capacity to vg_data, for example by creating a physical volume on a new disk and running vgextend, then repeating the lvextend.

Exam trap

The trap here is blaming the filesystem or the syntax when the real constraint is simply free space in the volume group.

17
MCQmedium

A Linux server uses LVM for its data volume /dev/vg_data/lv_app. The volume group vg_data has 30 GB of free extents and the logical volume lv_app is currently 100 GB. An administrator runs `lvextend -L +20G /dev/vg_data/lv_app` and receives a success message, but `df -h /app` still reports 100 GB. The filesystem on lv_app is ext4. Which command must the administrator run next to make the additional space usable?

A.e2fsck -f /dev/vg_data/lv_app
B.resize2fs /dev/vg_data/lv_app
C.xfs_growfs /app
D.pvresize /dev/vg_data/lv_app
AnswerB

The ext4 filesystem must be grown to match the enlarged block device; resize2fs performs that online growth without unmounting. lvextend only resizes the logical volume, so df still reports the old filesystem size until resize2fs runs. This is the standard two-step procedure for ext4 on LVM without the -r shortcut.

Why this answer

Extending an LVM logical volume with lvextend changes only the block device mapping; the ext4 filesystem inside keeps its original size until resized. Running resize2fs against the LV path grows the filesystem online to fill the new extents, after which df reflects the additional capacity. The XFS-only grow tool, a consistency checker, and a PV-level resize command all fail to accomplish this here.

Exam trap

The trap here is assuming lvextend also resizes the filesystem, when in fact the filesystem must be grown separately for ext4.

18
MCQhard

A company's database server uses LVM for storage. The system administrator notices that the logical volume /dev/vg_db/lv_data is at 95% capacity. The server is in production and cannot be taken offline. The volume group vg_db has free physical extents. Which command sequence should the administrator use to safely increase the size of the logical volume and filesystem without unmounting?

A.lvextend /dev/vg_db/lv_data /dev/sdb; resize2fs /dev/vg_db/lv_data
B.lvresize -L +10G /dev/vg_db/lv_data; mkfs.ext4 /dev/vg_db/lv_data
C.lvextend -L +10G /dev/vg_db/lv_data; mount -o remount /dev/vg_db/lv_data
D.lvextend -L +10G /dev/vg_db/lv_data; resize2fs /dev/vg_db/lv_data
AnswerD

Extending the logical volume with lvextend consumes free physical extents in vg_db, then resize2fs grows the ext2/3/4 filesystem online, satisfying the no-unmount constraint. This pairing works only because the filesystem is ext-based; XFS would instead require xfs_growfs.

Why this answer

It first extends the logical volume using `lvextend -L +10G` to allocate additional physical extents from the volume group, then resizes the ext4 filesystem online with `resize2fs` to utilize the new space. Both operations can be performed without unmounting the filesystem, as ext4 supports online resizing and LVM allows live extension of logical volumes.

Exam trap

The trap here is that candidates may think `mount -o remount` resizes the filesystem or that `mkfs.ext4` can be used to expand an existing filesystem, when in fact a filesystem-specific resize command is required after extending the logical volume.

How to eliminate wrong answers

Option A is wrong because it specifies a physical volume (`/dev/sdb`) instead of a size increment, which would attempt to use the entire device rather than adding a specific amount of space, and the syntax is incorrect for extending by a size. Option B is wrong because `mkfs.ext4` would create a new filesystem, destroying existing data, and does not resize the current filesystem. Option C is wrong because `mount -o remount` only re-mounts the filesystem and does not resize it; the filesystem must be explicitly resized with `resize2fs` after extending the logical volume.

19
MCQhard

A system administrator is troubleshooting a server that fails to boot because the root filesystem, which is on an LVM logical volume, cannot be found. The administrator suspects that the initramfs does not include the necessary LVM modules. Which command should be used to rebuild the initramfs for the currently running kernel on a Debian-based system?

A.grub-mkconfig -o /boot/grub/grub.cfg
B.update-initramfs -u
C.dracut -f
D.mkinitrd -f /boot/initrd.img-$(uname -r)
AnswerB

update-initramfs -u updates the initramfs for the currently running kernel on Debian-based systems. It regenerates the initramfs image using the current configuration, which should include LVM modules if the system is configured to use LVM. This is the correct command to ensure the boot image can activate LVM volumes.

Why this answer

On Debian-based systems, the initramfs is managed with update-initramfs. Running update-initramfs -u regenerates the image for the current kernel, incorporating any needed modules such as LVM. Other tools like dracut or mkinitrd are used on different distributions and are not the default on Debian, and grub-mkconfig only updates the bootloader configuration.

Exam trap

The trap here is assuming that initramfs tools are universal across distributions, when each family has its own default command.

20
MCQhard

An administrator created an LVM snapshot of a logical volume to perform a backup. During the backup, the snapshot runs out of space. What will happen to the original logical volume?

A.The original volume becomes read-only.
B.The backup completes successfully but data may be inconsistent.
C.The snapshot becomes invalid and must be recreated.
D.The original volume is automatically extended.
AnswerC

LVM snapshots have a fixed size; when copy-on-write data fills it, the snapshot is marked invalid and further writes to the origin are not tracked. The original logical volume remains intact and usable, but the snapshot cannot be used for backup and must be recreated.

Why this answer

When an LVM snapshot runs out of space, it becomes invalid and cannot track changes made to the original logical volume during the backup. The snapshot is automatically dropped by the device-mapper, and any attempt to mount or read it will fail. The original logical volume remains fully functional and unaffected, but the snapshot must be recreated to perform a new backup.

Exam trap

The trap here is that candidates often assume the original volume will be affected (e.g., become read-only or extended) when the snapshot runs out of space, but LVM isolates the original volume from snapshot failures, so only the snapshot is invalidated.

How to eliminate wrong answers

Option A is wrong because the original volume does not become read-only; LVM snapshots are copy-on-write, and running out of space in the snapshot only invalidates the snapshot, not the original volume. Option B is wrong because the backup cannot complete successfully; once the snapshot runs out of space, it is dropped and becomes inaccessible, so the backup process will fail or produce an error. Option D is wrong because LVM does not automatically extend snapshots or original volumes; snapshot size must be manually monitored and extended using 'lvextend' before it fills up.

21
MCQeasy

Refer to the exhibit. The administrator wants to create a RAID 1 array using /dev/sdb1 and /dev/sdc1. Which command should be used?

A.mdadm --create /dev/md0 --level=5 --raid-devices=2 /dev/sdb1 /dev/sdc1
B.mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
C.mdadm --create /dev/md0 --level=10 --raid-devices=2 /dev/sdb1 /dev/sdc1
D.mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sdb1 /dev/sdc1
AnswerB

The `--create` mode with `--level=1` builds a RAID 1 mirror across exactly two member devices, satisfying the stem's redundancy requirement. Naming `/dev/sdb1` and `/dev/sdc1` after `--raid-devices=2` matches the declared count, so mdadm assembles `/dev/md0` without prompting for a missing or spare disk.

Why this answer

RAID 1 (mirroring) requires exactly two devices to provide redundancy by duplicating data across both disks. The `--level=1` parameter specifies RAID 1, and `--raid-devices=2` matches the two partitions /dev/sdb1 and /dev/sdc1.

Exam trap

The trap here is that candidates confuse RAID levels and their minimum device requirements, often selecting RAID 5 or RAID 10 without verifying the device count, or mistakenly thinking RAID 0 provides redundancy.

How to eliminate wrong answers

Option A is wrong because `--level=5` (RAID 5) requires a minimum of three devices for striping with distributed parity, not two. Option C is wrong because `--level=10` (RAID 10) is a nested RAID combining mirroring and striping, requiring at least four devices (two mirrored pairs). Option D is wrong because `--level=0` (RAID 0) provides striping without redundancy, which does not meet the administrator's goal of creating a RAID 1 array.

22
Matchingmedium

Match each Linux package management command to its distribution.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Debian/Ubuntu

RHEL/CentOS 7

Fedora/RHEL 8+

openSUSE

Arch Linux

Why these pairings

Package managers are tied to specific distribution families: apt (Debian/Ubuntu), yum (RHEL/CentOS 7), dnf (Fedora/RHEL 8+), pacman (Arch), and zypper (openSUSE). Common confusions arise from mixing these tools across distributions.

23
MCQmedium

An administrator receives a report that a specific directory /var/log is consuming too much disk space. Which command should be used to determine the total disk space used by that directory?

A.df -h /var/log
B.ls -la /var/log
C.fdisk /var/log
D.du -sh /var/log
AnswerD

du -s summarises total usage for the directory rather than listing every file, and -h renders it in human-readable units. This directly answers the request for total space consumed by /var/log, unlike df, which reports filesystem-level usage.

Why this answer

The `du -sh /var/log` command calculates the total disk space used by the specified directory. The `-s` flag summarizes the total size, `-h` provides human-readable output (e.g., in KB, MB, GB), and the path `/var/log` targets the directory in question. This is the standard Linux command for determining directory disk usage.

Exam trap

The trap here is that candidates confuse `df` (filesystem-level usage) with `du` (directory-level usage), often selecting `df -h` because it shows disk space, without realizing it reports on the entire partition rather than the specific directory.

How to eliminate wrong answers

Option A is wrong because `df -h /var/log` reports the disk space usage of the filesystem (partition) that contains `/var/log`, not the directory itself; it shows total, used, and available space for the entire mount point. Option B is wrong because `ls -la /var/log` lists the contents of the directory with file sizes but does not sum them recursively, so it cannot provide the total disk space consumed by the directory tree. Option C is wrong because `fdisk /var/log` is a partition table manipulation tool that operates on block devices (e.g., /dev/sda), not on directories; it would fail with an error when given a directory path.

24
MCQeasy

A system administrator receives an alert that disk /dev/sda is predicted to fail soon. The server uses LVM, and /dev/sda is part of a volume group named vg_system. Which of the following is the best course of action to replace the failing disk without downtime?

A.Use dd to clone /dev/sda to a new disk and then replace.
B.Use ddrescue to copy data, then replace the disk.
C.Remove /dev/sda from the volume group and add a new disk.
D.Use pvmove to move physical extents to another disk, then remove the old disk.
AnswerD

pvmove relocates the physical extents residing on the failing physical volume to another disk in vg_system while the volume group stays online. The old disk can then be removed with vgreduce and pvremove, replacing it without downtime.

Why this answer

Pvmove relocates physical extents from /dev/sda to another physical volume in the same volume group while the filesystem remains online and accessible. This allows the failing disk to be removed from vg_system without any downtime, preserving LVM metadata and data integrity.

Exam trap

The trap here is that candidates confuse block-level cloning (dd) with LVM-aware migration (pvmove), assuming any copy tool can replace a disk in an LVM setup without understanding that LVM metadata and extent mapping must be handled correctly to avoid downtime or data corruption.

How to eliminate wrong answers

Option A is wrong because dd clones the entire block device including LVM metadata, which can cause UUID conflicts and requires the disk to be offline or unmounted, leading to downtime. Option B is wrong because ddrescue is designed for data recovery from failing media, not for live migration within LVM, and still requires the disk to be taken offline. Option C is wrong because removing /dev/sda from the volume group without first moving its extents would cause data loss; vgreduce can only remove a physical volume that has no allocated extents.

25
MCQeasy

A system administrator needs to mount an ext4 filesystem with the options 'noatime' and 'errors=remount-ro'. Which mount command is correct?

A.mount -o noatime,errors=remount /dev/sda1 /mnt
B.mount -o noatime -o errors=remount-ro /dev/sda1 /mnt
C.mount -o atime=no,errors=remount-ro /dev/sda1 /mnt
D.mount -o noatime,errors=remount-ro /dev/sda1 /mnt
AnswerD

The -o flag passes a comma-separated option list to mount, so noatime and errors=remount-ro are applied together for this ext4 filesystem. The device and mount point follow in the correct order, satisfying both requested behaviours.

Why this answer

The `mount -o noatime,errors=remount-ro /dev/sda1 /mnt` command uses a single `-o` flag with a comma-separated list of mount options, which is the proper syntax for specifying multiple options. The `noatime` option disables updating the access time on reads, and `errors=remount-ro` tells the kernel to remount the filesystem as read-only if an I/O error is encountered, both of which are valid ext4 mount options.

Exam trap

The trap here is that candidates may incorrectly use multiple `-o` flags (as in option B) or mistype the `errors` option (as in option A), confusing the `remount-ro` syntax with the unrelated `remount` command, or they may assume `atime=no` is a valid alternative to `noatime` (as in option C).

How to eliminate wrong answers

Option A is wrong because it specifies `errors=remount` instead of `errors=remount-ro`; the correct option requires the `-ro` suffix to indicate remount as read-only. Option B is wrong because it uses two separate `-o` flags (`-o noatime -o errors=remount-ro`), which is invalid syntax; the mount command accepts only one `-o` option, and multiple options must be comma-separated within a single `-o` argument. Option C is wrong because `atime=no` is not a valid mount option; the correct syntax to disable access time updates is `noatime` (or `relatime` for relative updates), not `atime=no`.

26
MCQeasy

A junior administrator needs to identify the UUID of the ext4 filesystem on /dev/nvme0n1p2 so it can be referenced in /etc/fstab instead of the device path. Which command displays that UUID?

A.lsblk -o NAME,SIZE,TYPE
B.fdisk -l /dev/nvme0n1p2
C.mount | grep nvme0n1p2
D.blkid /dev/nvme0n1p2
AnswerD

blkid reads the filesystem superblock and prints the UUID, type, and label for the given device. It is the standard, low-level way to obtain a filesystem UUID for use in /etc/fstab. The other tools either report partition-table GUIDs or require the filesystem to be mounted.

Why this answer

blkid probes the device and reports the filesystem UUID stored in the ext4 superblock, which is exactly the value needed for an fstab entry like UUID=xxxx-... /data ext4 defaults 0 2. It works whether or not the filesystem is mounted. The other commands either display partition-table metadata or require mounting and still do not print the UUID.

Exam trap

The trap here is confusing the partition-table PARTUUID shown by partitioning tools with the filesystem UUID reported by blkid.

27
MCQmedium

After creating an XFS filesystem on /dev/sdb1, an admin mounts it and writes data. Later, they run 'xfs_info /mnt/data' and see the filesystem was created with default settings. What is the default inode size for XFS on a typical Linux system?

A.512 bytes
B.128 bytes
C.4096 bytes
D.256 bytes
AnswerD

XFS defaults to a 256-byte inode on typical Linux systems, which is what `xfs_info` reports when `mkfs.xfs` runs without an `-i size=` override. This satisfies the stem's constraint of a filesystem created with default settings, so 256 bytes is the value observed.

Why this answer

The default inode size for XFS on a typical Linux system is 256 bytes. This is set at filesystem creation time and provides a balance between supporting extended attributes (like ACLs and SELinux contexts) and minimizing metadata overhead. The `xfs_info` command confirms the default settings, which include this 256-byte inode size.

Exam trap

The trap here is that candidates often confuse the default inode size of XFS (256 bytes) with that of ext4 (128 bytes) or mistake the block size (4096 bytes) for the inode size, leading them to select option B or C.

How to eliminate wrong answers

Option A is wrong because 512 bytes is not the default inode size for XFS; it is an optional larger size used when many extended attributes are needed, but it increases metadata overhead. Option B is wrong because 128 bytes is the default inode size for ext4, not XFS; XFS uses a larger inode to accommodate its B-tree-based metadata structures. Option C is wrong because 4096 bytes is the default block size for XFS, not the inode size; confusing block size with inode size is a common mistake.

28
Multi-Selecthard

A Linux administrator is configuring a new iSCSI storage target. The server has two network interfaces, eth0 and eth1, and the administrator wants to use multipath I/O (DM-Multipath) for redundancy and increased throughput. Which two steps are required to properly set up DM-Multipath for the iSCSI LUNs? (Choose two.)

Select 2 answers
A.Create a bonded network interface combining eth0 and eth1, and configure iSCSI to use the bond for all traffic.
B.Use iscsiadm to log in to the target portal on both eth0 and eth1, ensuring that each interface discovers the same LUNs.
C.Format the iSCSI LUNs with a cluster-aware filesystem such as GFS2 before enabling multipath.
D.Set the iSCSI initiator name to match the target's ACL, and configure CHAP authentication for each path.
E.Install and enable the multipathd service, then configure /etc/multipath.conf with the appropriate blacklist and multipath settings.
AnswersB, E

For DM-Multipath to provide redundancy and throughput, multiple paths to the same LUN must exist. Logging in via both network interfaces creates two separate iSCSI sessions, each seeing the same LUN, which the multipath layer can then combine. If only one interface is used, there is no multipath to manage, defeating the purpose of the configuration.

Why this answer

To set up DM-Multipath for iSCSI LUNs, you must install and configure multipathd and its configuration file, and you must create multiple iSCSI sessions to the same LUNs via different network interfaces. This ensures that the multipath layer can detect and manage multiple paths. Bonding or authentication are not substitutes for multipath configuration.

Exam trap

The trap here is confusing network bonding with multipath I/O; bonding aggregates links but does not create multiple SCSI paths, which are required for DM-Multipath to function.

29
MCQmedium

A Linux server has a volume group named vg_data that currently contains two physical volumes. The administrator needs to remove /dev/sdb1 from vg_data, but pvremove /dev/sdb1 returns an error stating the physical volume is still in use. Which command should the administrator run FIRST to migrate the extents off /dev/sdb1 onto the remaining physical volume?

A.lvconvert --repair vg_data
B.vgreduce vg_data /dev/sdb1
C.pvremove /dev/sdb1 --force
D.pvmove /dev/sdb1
AnswerD

pvmove relocates all logical extents from the specified physical volume to other physical volumes in the same volume group while the logical volumes remain online. Once the extents have been migrated, /dev/sdb1 no longer holds any allocated data, allowing vgreduce to remove it and pvremove to release the label. This is the documented first step before detaching a PV from an active VG.

Why this answer

To safely remove a physical volume from an active volume group, the allocated extents must first be moved to other PVs. pvmove performs this online migration without unmounting filesystems. Only after the PV reports zero used extents can vgreduce detach it and pvremove clear its label. Attempting vgreduce or pvremove beforehand fails because LVM protects allocated data.

Exam trap

The trap here is assuming that vgreduce or pvremove automatically evacuates data, when in fact LVM requires pvmove to migrate extents before a PV can be detached.

30
MCQeasy

A system administrator needs to set up software RAID1 on a server for /data. The available disks are /dev/sdb (500GB) and /dev/sdc (1TB). What is the maximum usable capacity of the RAID1 array?

A.500GB
B.250GB
C.1TB
D.1.5TB
AnswerA

RAID1 mirrors data across both disks, so usable capacity equals the smaller member's size. Since /dev/sdb is 500GB and /dev/sdc is 1TB, the array is limited to 500GB; the remaining 500GB on /dev/sdc is unusable.

Why this answer

RAID1 (mirroring) writes identical data to all disks in the array, so the usable capacity is limited by the smallest disk. With /dev/sdb at 500GB and /dev/sdc at 1TB, the maximum usable capacity is 500GB. The remaining space on /dev/sdc (500GB) is unusable in the RAID1 array because it cannot be mirrored.

Exam trap

The trap here is that candidates often assume RAID1 adds capacities (like RAID0) or averages them, rather than recognizing that mirroring strictly limits usable space to the smallest disk's capacity.

How to eliminate wrong answers

Option B is wrong because 250GB would only be the usable capacity if both disks were 500GB and you incorrectly halved the total (e.g., confusing RAID1 with RAID5 or RAID0). Option C is wrong because 1TB assumes the array can use the full capacity of the larger disk, which violates the mirroring constraint of RAID1. Option D is wrong because 1.5TB is the sum of both disks' capacities, which would only apply to RAID0 (striping) or JBOD, not RAID1.

31
Multi-Selecteasy

Which TWO of the following commands can be used to check and repair an ext4 filesystem?

Select 2 answers
A.fsck.ext4 /dev/sdb1
B.xfs_repair /dev/sdb1
C.mkfs.ext4 /dev/sdb1
D.e2fsck /dev/sdb1
E.btrfs check /dev/sdb1
AnswersA, D

`fsck.ext4` directly invokes the ext4-specific checker, which validates inode tables, block bitmaps and directory structures, then repairs inconsistencies. It satisfies the stem's requirement to both check and repair, and can be run against the unmounted `/dev/sdb1` device, unlike generic tools that merely report usage.

Why this answer

Option A, fsck.ext4 /dev/sdb1, is correct because fsck.ext4 is the ext4-specific front-end of the fsck utility, which checks and repairs ext4 filesystems on the specified block device. Option D, e2fsck /dev/sdb1, is also correct because e2fsck is the underlying ext2/ext3/ext4 filesystem checker that fsck.ext4 invokes, and it can both verify and repair ext4 filesystems. Option B, xfs_repair, is wrong because it is the repair tool for XFS filesystems, not ext4.

Option C, mkfs.ext4, is wrong because it creates (formats) a new ext4 filesystem rather than checking or repairing an existing one. Option E, btrfs check, is wrong because it is used to check Btrfs filesystems, not ext4.

Exam trap

The trap here is that candidates often confuse filesystem-specific repair tools (like `xfs_repair` for XFS or `btrfs check` for Btrfs) with the generic `fsck` family, or mistakenly think `mkfs.ext4` can repair a filesystem when it actually formats and destroys it.

32
MCQhard

A server uses LVM with volume group vg_data. The logical volume lv_app is mounted at /srv/app and is 200 GiB. The administrator adds a new 500 GiB disk, /dev/sdb, creates a physical volume on it, and extends vg_data with it. They then run lvextend -L +100G /dev/vg_data/lv_app. The filesystem is ext4. Which command must be run next to make the additional space usable without unmounting /srv/app?

A.lvresize -L +100G /dev/vg_data/lv_app
B.e2fsck -f /dev/vg_data/lv_app
C.resize2fs /dev/vg_data/lv_app
D.xfs_growfs /srv/app
AnswerC

For ext4, resize2fs grows the filesystem to fill the enlarged logical volume. It can be run online on a mounted ext4 filesystem, so /srv/app remains available. Without this step, the logical volume is larger but the filesystem still reports the old size. This command is required after lvextend when using ext4.

Why this answer

After extending the logical volume with lvextend, the ext4 filesystem must be grown to use the new space. resize2fs performs this online for ext4, keeping /srv/app mounted. xfs_growfs targets XFS, e2fsck checks but does not resize, and lvresize would further change the logical volume without touching the filesystem. The correct sequence is lvextend then resize2fs.

Exam trap

The trap here is assuming that extending the logical volume automatically grows the filesystem, or using a resize tool for the wrong filesystem type.

33
MCQeasy

A Linux server at a hosting provider uses a software RAID 5 array with three 2 TB disks (sda, sdb, sdc) configured as /dev/md0, hosting a large ext4 filesystem. The server experiences a performance degradation and I/O errors. The administrator checks /proc/mdstat and sees that /dev/sda is marked as failed. The remaining two disks are still active. The administrator has a spare disk /dev/sdd of the same size. The filesystem is sparse and can tolerate downtime. What is the most appropriate course of action to restore the array to a fully functional state with redundancy?

A.Recreate the RAID 5 array from scratch using all three healthy disks (sdb, sdc, sdd) and restore data from backup.
B.Run 'mdadm --manage /dev/md0 --fail /dev/sda --remove /dev/sda', then 'mdadm --manage /dev/md0 --add /dev/sdd'.
C.Run 'mdadm --manage /dev/md0 --add /dev/sdd' to directly add the new disk and let the array rebuild automatically.
D.Use LVM to mirror the two healthy disks and ignore the failed one, ensuring data redundancy.
AnswerB

Marking sda failed and removing it, then adding sdd, lets mdadm rebuild redundancy onto the spare while the degraded array stays online. This restores RAID 5 fault tolerance without recreating the ext4 filesystem, matching the requirement to regain redundancy with minimal disruption.

Why this answer

The correct procedure is to mark the failed disk as failed (if not already), remove it from the array, then add the spare disk /dev/sdd. This allows mdadm to rebuild the RAID 5 array onto the new disk, restoring redundancy. The commands 'mdadm --manage /dev/md0 --fail /dev/sda --remove /dev/sda' followed by 'mdadm --manage /dev/md0 --add /dev/sdd' accomplish this safely.

Exam trap

LFCS often tests the misconception that you can simply add a new disk to a degraded RAID array without first removing the failed disk, when in fact the failed disk must be marked failed and removed before adding the replacement.

How to eliminate wrong answers

Option A is wrong because recreating the array from scratch destroys all data and requires a backup restore, which is unnecessary when the array can be rebuilt with the spare disk. Option C is wrong because directly adding /dev/sdd without first removing the failed /dev/sda would result in a 4-disk array with one failed disk still present, and mdadm may not automatically rebuild onto the new disk; the failed disk must be removed first. Option D is wrong because using LVM to mirror the two healthy disks ignores the failed disk and does not restore the RAID 5 array; it also does not provide the same redundancy and is not the appropriate course of action for a RAID array.

34
Drag & Dropmedium

Order the steps to configure a cron job that runs a script every day at 2 AM.

Drag or tap steps into the slots.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4

Why this order

The correct order to configure a cron job is: open the crontab file with 'crontab -e', add the cron expression with the correct time fields (minute, hour, day, month, weekday) and the script path, save the file, and then verify with 'crontab -l'. Common mistakes include adding the line before opening the editor, saving before adding, or verifying before editing.

35
MCQhard

An administrator needs to encrypt a block device (/dev/sdc) using LUKS. Which command creates an encrypted LUKS container on the device?

A.cryptsetup luksOpen /dev/sdc encrypted_device
B.cryptsetup luksFormat /dev/sdc
C.openssl enc -aes-256-cbc -in /dev/sdc -out /dev/sdc.enc
D.dm-crypt create encrypted /dev/sdc
AnswerB

cryptsetup luksFormat initialises a LUKS header on the block device, establishing the encrypted container and prompting for the passphrase. This is the required first step before luksOpen maps it, satisfying the encryption requirement for /dev/sdc.

Why this answer

`cryptsetup luksFormat /dev/sdc` initializes the block device with a LUKS header, setting up an encrypted container that can later be opened with a passphrase or key file. This is the standard command for creating a new LUKS partition, as it writes the LUKS metadata and prepares the device for encryption.

Exam trap

The trap here is that candidates confuse `luksFormat` (which creates the container) with `luksOpen` (which opens/maps it), or they think a generic encryption tool like `openssl enc` can replace LUKS for block device encryption.

How to eliminate wrong answers

Option A is wrong because `cryptsetup luksOpen` is used to map an existing LUKS container to a device mapper name (e.g., /dev/mapper/encrypted_device), not to create a new encrypted container. Option C is wrong because `openssl enc` performs file-level encryption using a cipher like AES-256-CBC, but it does not create a LUKS container or handle block device encryption with proper metadata; it would produce an encrypted file, not a usable encrypted block device. Option D is wrong because `dm-crypt create` is not a valid command; the correct tool for device-mapper encryption is `cryptsetup`, and the syntax `dm-crypt create` does not exist in standard Linux utilities.

36
MCQmedium

An administrator has created an LVM thin pool. Which command should be used to create a thin logical volume named 'thinvol' of size 100GB from the thin pool 'pool1' in volume group 'vg1'?

A.lvcreate -L 100G -n thinvol vg1
B.lvcreate -s vg1/pool1 -n thinvol
C.lvcreate -V 100G -T vg1/pool1 --name thinvol
D.lvcreate -L 100G -T vg1/pool1 --name thinvol
AnswerC

The -V flag creates a virtual (thin) volume, while -T names the thin pool vg1/pool1 as its backing store. This pairing is what distinguishes thin provisioning from a standard linear LV, satisfying the 100GB thinvol requirement.

Why this answer

The `lvcreate` command for thin logical volumes requires the `-V` flag to specify the virtual size of the thin volume and the `-T` flag to reference the thin pool. The syntax `-V 100G -T vg1/pool1 --name thinvol` correctly creates a thin logical volume named 'thinvol' with a virtual size of 100GB from the thin pool 'pool1' in volume group 'vg1'.

Exam trap

The trap here is that candidates often confuse the `-L` flag (used for standard LVs or pool sizes) with the `-V` flag (required for thin volumes), leading them to select option D, which incorrectly uses `-L` instead of `-V` for the thin volume's virtual size.

How to eliminate wrong answers

Option A is wrong because `lvcreate -L 100G -n thinvol vg1` creates a standard (thick) logical volume, not a thin logical volume, and does not reference a thin pool. Option B is wrong because `lvcreate -s vg1/pool1 -n thinvol` is used to create a snapshot, not a thin logical volume; the `-s` flag creates a snapshot of an existing logical volume. Option D is wrong because `lvcreate -L 100G -T vg1/pool1 --name thinvol` uses the `-L` flag to specify the size, but for thin volumes, the `-V` flag must be used to define the virtual size; `-L` is for the pool's metadata or data size, not the thin volume's virtual size.

37
MCQmedium

A Linux server uses LVM. The volume group vg_data has 10 GB of free extents. The logical volume /dev/vg_data/lv_app is 20 GB and must be increased by 5 GB while it is mounted and actively used by an application. Which command sequence correctly extends the logical volume and then grows the ext4 filesystem online?

A.lvextend -L +5G /dev/vg_data/lv_app && xfs_growfs /dev/vg_data/lv_app
B.lvextend -L +5G /dev/vg_data/lv_app && resize2fs /dev/vg_data/lv_app
C.lvresize -L +5G /dev/vg_data/lv_app && resize2fs /dev/vg_data/lv_app
D.lvextend -L 25G /dev/vg_data/lv_app && e2fsck -f /dev/vg_data/lv_app
AnswerB

lvextend -L +5G adds 5 GB to the logical volume, and resize2fs then expands the ext4 filesystem to use the new space. Because ext4 supports online resizing, this sequence works while the filesystem is mounted. This is the standard, safe method to grow both the LV and the filesystem without unmounting.

Why this answer

To extend an ext4 filesystem on LVM online, you first increase the logical volume with lvextend, then expand the filesystem with resize2fs. ext4 supports online growth, so the application can continue running. Using xfs_growfs on ext4 or running a filesystem check instead of resize2fs will not achieve the desired result.

Exam trap

The trap here is confusing filesystem-specific growth tools, such as xfs_growfs for XFS, with resize2fs for ext4.

38
MCQeasy

Which command can be used to display the UUID of a filesystem on /dev/sdb1?

A.blkid /dev/sdb1
B.tune2fs -l /dev/sdb1
C.df -h /dev/sdb1
D.lsblk /dev/sdb1
AnswerA

`blkid /dev/sdb1` queries the block device directly, reading the filesystem superblock to report its UUID, TYPE and LABEL. Because it inspects the device itself rather than mount tables, it satisfies the stem's requirement to display the UUID of the filesystem on that specific unmounted partition.

Why this answer

The blkid command is specifically designed to locate and print block device attributes, including the UUID and filesystem type. When run against a device like /dev/sdb1, it queries the kernel's device mapper and reads the filesystem superblock to extract the universally unique identifier (UUID). This is the most direct and reliable method for displaying a filesystem's UUID.

Exam trap

The trap here is that candidates often assume tune2fs -l is the universal UUID display tool, but it only works on ext2/3/4 filesystems, whereas blkid works across all Linux filesystem types and is the standard command for this task.

How to eliminate wrong answers

Option B (tune2fs -l /dev/sdb1) is wrong because tune2fs is an ext2/ext3/ext4 filesystem tuning tool; while it can display the UUID in its output, it only works on ext2/3/4 filesystems and will fail or produce no UUID for other types like XFS or Btrfs. Option C (df -h /dev/sdb1) is wrong because df reports disk space usage for mounted filesystems, not UUIDs; it shows mount points and capacity, not block device attributes. Option D (lsblk /dev/sdb1) is wrong because lsblk lists block devices and their partitions, but by default it does not display UUIDs unless the -f or -o UUID option is used; without those flags, it shows only device names, sizes, and mount points.

39
MCQmedium

A Linux server has a volume group named vg_data that contains a logical volume lv_archive currently formatted with XFS and mounted at /archive. The administrator needs to shrink the logical volume to free space for a new logical volume. Which command sequence correctly reduces the size of lv_archive?

A.umount /archive; xfs_growfs -D 20G /dev/vg_data/lv_archive; lvreduce -L 20G /dev/vg_data/lv_archive; mount /archive
B.umount /archive; lvreduce -L 20G /dev/vg_data/lv_archive; lvresize -r -L 20G /dev/vg_data/lv_archive; mount /archive
C.umount /archive; backup data; lvremove /dev/vg_data/lv_archive; lvcreate -L 20G -n lv_archive vg_data; mkfs.xfs /dev/vg_data/lv_archive; restore data; mount /archive
D.umount /archive; lvreduce -r -L 20G /dev/vg_data/lv_archive; mount /archive
AnswerC

Because XFS does not support shrinking, the only way to reduce the size of an XFS logical volume is to back up the data, remove the logical volume, create a smaller one, make a new XFS filesystem, and restore the data. This sequence correctly performs those steps. The other options incorrectly assume XFS can be shrunk in place, which is not supported.

Why this answer

XFS filesystems cannot be shrunk. To reduce the size of an XFS logical volume, the administrator must back up the data, remove the logical volume, create a new smaller logical volume, format it with XFS, and restore the data. Any attempt to use lvreduce with -r or xfs_growfs to shrink will fail because XFS only supports growing.

Exam trap

The trap here is assuming that XFS can be shrunk like ext4, or that lvreduce -r can handle XFS shrinking, when in fact XFS does not support shrink operations at all.

40
MCQeasy

A junior administrator needs to mount an ISO image located at /opt/install.iso to the /mnt/iso directory to access its contents. Which command accomplishes this?

A.mount --bind /opt/install.iso /mnt/iso
B.losetup /dev/loop0 /opt/install.iso && mount /dev/loop0 /mnt/iso
C.mount -t iso9660 /opt/install.iso /mnt/iso
D.mount -o loop /opt/install.iso /mnt/iso
AnswerD

The -o loop option tells mount to associate the ISO file with a loop device, making it accessible as a block device. This allows the filesystem inside the ISO (usually ISO9660) to be mounted at the specified directory. It is the standard and correct way to mount an ISO image on Linux without burning it to physical media.

Why this answer

Mounting an ISO file requires the loop option so that the kernel treats the file as a block device. The command mount -o loop /opt/install.iso /mnt/iso creates a loop device automatically and mounts the ISO9660 filesystem, making the contents accessible. This is the standard method for accessing ISO images without burning them.

Exam trap

The trap here is forgetting the loop option and specifying only the filesystem type, which fails because mount expects a block device, not a regular file.

41
MCQeasy

Which of the following commands can be used to display the total, used, and available space for all mounted ext4 filesystems?

A.lsblk
B.fdisk -l
C.df -hT
D.tune2fs -l /dev/sda1
AnswerC

The `-T` flag adds a filesystem type column, letting you filter the output to ext4 only, while `-h` presents total, used, and available space in human-readable units. Plain `df` omits the type column, so it cannot isolate ext4 mounts as the question requires.

Why this answer

The `df -hT` command displays disk space usage for all mounted filesystems, with the `-h` flag providing human-readable sizes (e.g., GB, MB) and the `-T` flag showing the filesystem type (e.g., ext4). This directly meets the requirement to show total, used, and available space for all mounted ext4 filesystems.

Exam trap

The trap here is that candidates often confuse `lsblk` or `fdisk -l` as disk space commands, but these tools show partition layout or device information, not filesystem-level usage statistics like total, used, and available space.

How to eliminate wrong answers

Option A is wrong because `lsblk` lists block devices (e.g., disks and partitions) but does not display filesystem usage statistics like total, used, or available space. Option B is wrong because `fdisk -l` shows partition table information (e.g., start/end sectors, partition types) for disks, not mounted filesystem space usage. Option D is wrong because `tune2fs -l /dev/sda1` displays ext4 filesystem parameters (e.g., block count, reserved blocks) from the superblock, but it only applies to a single specified device and does not show used or available space for all mounted filesystems.

42
Multi-Selectmedium

Which THREE of the following are valid Linux filesystem types that can be used for root partitions on a modern Linux system?

Select 3 answers
A.XFS
B.NTFS
C.FAT32
D.Btrfs
E.ext4
AnswersA, D, E

XFS is a mature, high-performance 64-bit journaling filesystem, and every mainstream distribution supports it as a root partition, including GRUB and initramfs tooling. It satisfies the stem's requirement for a valid modern Linux root filesystem type.

Why this answer

XFS (A) is a valid Linux native filesystem, long supported as a root filesystem and the default on RHEL/CentOS, so it is correct. Btrfs (D) is a modern Linux copy-on-write filesystem with full root-partition support (including subvolumes and snapshots), making it correct. ext4 (E) is the long-standing default Linux filesystem and fully supports being mounted as the root partition, so it is correct. NTFS (B) is Microsoft's Windows filesystem and FAT32 (C) is a legacy FAT variant; although Linux can mount them via drivers, neither is a valid native Linux filesystem type for a root partition on a modern system.

Exam trap

The trap here is that candidates may confuse filesystems that Linux can read/write (like NTFS or FAT32) with native Linux filesystems that are suitable for root partitions, or they may overlook that Btrfs, while less common, is fully supported and valid for root on modern distributions.

43
Multi-Selecteasy

Which TWO commands can be used to mount a filesystem on /dev/sdb1 to /mnt/data?

Select 2 answers
A.mount /mnt/data /dev/sdb1
B.mount /dev/sdb1 /mnt/data
C.mount -t ext4 /dev/sdb1 /mnt/data
D.mount -o loop /dev/sdb1 /mnt/data
E.mount -t auto /dev/sdb1 /mnt/data -o loop
AnswersB, C

The two-argument form lets mount auto-detect the filesystem type from the device's superblock, then attach /dev/sdb1 at /mnt/data. No type or options are required, satisfying the requirement to mount that specific block device at that mount point.

Why this answer

Option B is correct because the standard mount syntax is `mount <device> <mountpoint>`, so `mount /dev/sdb1 /mnt/data` mounts the block device /dev/sdb1 onto the existing directory /mnt/data. Option C is also correct because adding `-t ext4` explicitly specifies the filesystem type, and the device-then-mountpoint order remains valid, so `mount -t ext4 /dev/sdb1 /mnt/data` successfully mounts the ext4 filesystem. Option A is wrong because it reverses the arguments, treating /mnt/data as the device and /dev/sdb1 as the mountpoint.

Option D is wrong because `-o loop` is used to mount a regular file as a loopback device, not a real block device like /dev/sdb1. Option E is wrong because it combines an unnecessary `-t auto` with `-o loop`, which is inappropriate for mounting a physical partition.

Exam trap

Linux Foundation often tests the argument order of the mount command, trapping candidates who confuse the device and mount point positions, especially when combined with options like `-t` or `-o`.

44
MCQeasy

A junior administrator has installed a new 4 TB SATA disk as /dev/sdb on a RHEL 9 server and wants to use it as a single XFS filesystem mounted at /data. The disk currently has no partition table. Which command should be run first to create an XFS filesystem directly on the whole device?

A.mkfs -t xfs /dev/sdb1
B.xfs_growfs /dev/sdb
C.fdisk /dev/sdb && mkfs.xfs /dev/sdb
D.mkfs.xfs /dev/sdb
AnswerD

mkfs.xfs creates an XFS filesystem directly on the named block device, so running it against /dev/sdb formats the entire raw disk without requiring a partition table. This matches the requirement of one XFS filesystem on the whole 4 TB disk. Note that mkfs.xfs refuses to overwrite an existing filesystem unless -f is supplied, but here the disk is empty.

Why this answer

Creating an XFS filesystem on a raw block device is done with mkfs.xfs followed by the device path. Because the new 4 TB disk has no partition table and the requirement is a single filesystem spanning the entire device, targeting /dev/sdb directly is correct. Partitioning is optional when the whole disk is dedicated to one filesystem.

Exam trap

The trap here is assuming that a partition must always be created before formatting, which leads to choosing a command that targets a nonexistent /dev/sdb1.

45
MCQmedium

A system administrator needs to create a new ext4 filesystem on /dev/sdb1 with a reserved block percentage of 2% instead of the default 5%. Which command should be used?

A.mkfs.ext4 -m 2 /dev/sdb1
B.mkfs.ext4 -R 2 /dev/sdb1
C.mkfs.ext4 -r 2 /dev/sdb1
D.tune2fs -m 2 /dev/sdb1
AnswerA

The `-m` flag sets the reserved-blocks percentage, so `-m 2` allocates exactly 2% for root rather than the ext4 default of 5%, satisfying the stem's constraint. Running `mkfs.ext4` also creates the filesystem on the specified partition, `/dev/sdb1`, in a single command.

Why this answer

The `-m` flag in `mkfs.ext4` sets the reserved block percentage for the superuser, and specifying `-m 2` overrides the default of 5% to reserve only 2% of the blocks on the new ext4 filesystem on /dev/sdb1.

Exam trap

The trap here is that candidates confuse `-m` (reserved block percentage) with `-r` (revision number) or `-R` (RAID stride), or they incorrectly choose `tune2fs` which modifies an existing filesystem rather than creating a new one.

How to eliminate wrong answers

Option B is wrong because `-R` is not a valid flag for `mkfs.ext4`; it is used with `mkfs.ext2` for RAID stride options, not for reserved block percentage. Option C is wrong because `-r` in `mkfs.ext4` specifies the filesystem revision number, not the reserved block percentage. Option D is wrong because `tune2fs` modifies an existing filesystem's parameters (including reserved block percentage with `-m`), but the question explicitly asks for creating a new filesystem, not tuning an existing one.

46
MCQmedium

An administrator needs to set the reserved block percentage on an ext4 filesystem to 1% for a non-root filesystem. Which command accomplishes this?

A.tune2fs -m 0.5 /dev/sdb1
B.tune2fs -m 1 /dev/sdb1
C.tune2fs -r 1% /dev/sdb1
D.tune2fs -c 1 /dev/sdb1
AnswerB

`tune2fs -m 1 /dev/sdb1` sets the reserved block percentage directly on the ext4 filesystem, satisfying the 1% requirement. The `-m` flag adjusts the percentage of blocks reserved for root, and unlike `-r`, it accepts a percentage rather than a block count. This applies immediately without unmounting.

Why this answer

The `tune2fs -m` command sets the reserved block percentage for an ext4 filesystem, and `-m 1` sets it to exactly 1%. This is the standard way to adjust reserved space on a non-root ext4 filesystem, as root filesystems typically have a default of 5% reserved for system processes.

Exam trap

The trap here is confusing the `-m` (percentage) and `-r` (absolute blocks) options, leading candidates to incorrectly use `-r` with a percentage value like `1%`.

How to eliminate wrong answers

Option A is wrong because `-m 0.5` sets the reserved block percentage to 0.5%, not 1%. Option C is wrong because `-r` expects an absolute number of reserved blocks, not a percentage; the syntax `-r 1%` is invalid and would cause an error. Option D is wrong because `-c 1` sets the maximum mount count between filesystem checks, not the reserved block percentage.

47
MCQmedium

An administrator needs to mount an XFS filesystem with options to optimize for a database workload. Which mount option would reduce metadata updates to improve performance?

A.noexec
B.nodiratime
C.relatime
D.noatime
AnswerD

noatime suppresses access-time updates on every file read, eliminating a metadata write per read. For a database workload performing constant reads, this reduces journal and metadata overhead on the XFS filesystem, improving throughput without affecting data integrity.

Why this answer

The `noatime` mount option disables updates to the inode access time (atime) on every file read. For database workloads, this eliminates a significant source of metadata write I/O, reducing disk contention and improving overall performance by avoiding unnecessary journal updates on XFS.

Exam trap

The trap here is that candidates confuse `relatime` (which reduces but does not eliminate atime updates) with `noatime`, or incorrectly assume `nodiratime` is sufficient for database optimization, when only `noatime` fully removes metadata write overhead for all files.

How to eliminate wrong answers

Option A is wrong because `noexec` prevents execution of binaries on the filesystem, which does not affect metadata updates or database I/O performance. Option B is wrong because `nodiratime` only disables atime updates for directories, not for regular files, so it provides only partial reduction in metadata writes. Option C is wrong because `relatime` updates atime only if the previous atime is older than the mtime or ctime, which still generates some metadata writes and is less aggressive than `noatime` for write-heavy database workloads.

48
MCQmedium

A Linux server has a single XFS filesystem mounted at /data on /dev/sdb1. The storage array behind /dev/sdb1 is expanded and the block device is now 2 TB instead of 1 TB. The administrator confirms that the kernel sees the larger device with blockdev --getsize64 /dev/sdb1. Which command should be run to make the additional space usable by the mounted /data filesystem?

A.xfs_growfs /data
B.growpart /dev/sdb 1
C.resize2fs /dev/sdb1
D.xfs_repair /dev/sdb1
AnswerA

xfs_growfs is the correct tool for expanding a mounted XFS filesystem. It takes the mount point as its argument, not the block device, and it communicates with the running XFS kernel module to extend the filesystem into the additional space that the underlying block device now exposes. Running it on /data grows the live filesystem without unmounting it, which is exactly what this scenario requires.

Why this answer

XFS filesystems are extended with the xfs_growfs command, which operates on a mounted filesystem using its mount point. Because the block device already reports the larger size, the only remaining step is to grow the XFS filesystem into that free space. Tools such as resize2fs target ext-family filesystems, while xfs_repair and growpart address different problems, so they cannot satisfy this requirement.

Exam trap

The trap here is assuming that any resize utility works on any filesystem, when XFS must be grown with xfs_growfs on the mount point rather than resize2fs on the device.

49
MCQhard

An admin notices a PV in a VG has failed. The VG is still accessible with redundancy. Which command sequence should be used to replace the faulty PV with a new one (/dev/sde) while the VG is active and without data loss?

A.pvcreate /dev/sde; vgreduce VG_name /dev/sdb; vgextend VG_name /dev/sde; pvmove /dev/sdb
B.pvcreate /dev/sde; pvmove /dev/sdb /dev/sde; vgextend VG_name /dev/sde; vgreduce VG_name /dev/sdb
C.pvcreate /dev/sde; vgextend VG_name /dev/sde; pvmove /dev/sdb /dev/sde; vgreduce VG_name /dev/sdb
D.vgreduce --removemissing VG_name; pvcreate /dev/sde; vgextend VG_name /dev/sde; pvmove /dev/sde
AnswerC

Initialising /dev/sde with pvcreate, then vgextend adds it to the active VG, satisfying the no-downtime constraint. pvmove migrates extents off the faulty /dev/sdb to the new PV while the VG stays online, preserving redundancy. vgreduce finally removes /dev/sdb, completing replacement without data loss.

Why this answer

It first creates the new PV on /dev/sde, extends the VG to include it, then uses pvmove to migrate data from the failing PV (/dev/sdb) to the new PV while the VG is active, and finally removes the faulty PV from the VG with vgreduce. This sequence ensures no data loss and maintains VG availability throughout the replacement process.

Exam trap

The trap here is that candidates often try to remove the failed PV first (using vgreduce or vgreduce --removemissing) before adding the new one, not realizing that data must be migrated off the failing PV while it is still in the VG to avoid data loss.

How to eliminate wrong answers

Option A is wrong because it attempts to reduce the VG before moving data off the failing PV, which would cause data loss if the PV still holds logical volumes. Option B is wrong because it tries to pvmove data from /dev/sdb to /dev/sde before /dev/sde is added to the VG, which will fail since pvmove requires both source and target PVs to be members of the same VG. Option D is wrong because it uses vgreduce --removemissing to forcibly remove the failing PV without first migrating its data, leading to data loss, and also attempts pvmove on the new PV (/dev/sde) which has no data to move.

50
MCQmedium

After extending the logical volume, the df output still shows 100G. What is the most likely reason?

A.The filesystem on the logical volume has not been resized.
B.lvresize must be used instead of lvextend.
C.The kernel has not detected the new size; reboot required.
D.The mount point must be remounted with the 'remount' option.
AnswerA

Extending the logical volume only enlarges the block device; the filesystem on top retains its original size until explicitly grown. Since df reports filesystem capacity, not volume size, it still shows 100G. Resizing the filesystem (for example with resize2fs or xfs_growfs) is required to reflect the added space.

Why this answer

`lvextend` only increases the size of the logical volume at the block device level. The filesystem (e.g., ext4, XFS) still sees the original size until it is explicitly resized with a command like `resize2fs` (for ext4) or `xfs_growfs` (for XFS). The `df` command reports filesystem usage, not the underlying block device size, so the filesystem must be grown to match the LV.

Exam trap

The trap here is that candidates assume extending the logical volume automatically resizes the filesystem, but the LFCS exam tests the explicit two-step process: LV extension followed by filesystem resize.

How to eliminate wrong answers

Option B is wrong because `lvresize` and `lvextend` are functionally equivalent for increasing LV size; both require a subsequent filesystem resize. Option C is wrong because the kernel detects the new LV size immediately via device-mapper; no reboot is needed, and `df` still shows the old size only because the filesystem hasn't been resized. Option D is wrong because remounting does not resize the filesystem; it only changes mount options, and the filesystem metadata remains unchanged.

51
MCQmedium

An administrator has enabled quotas on the /home filesystem by adding usrquota,grpquota to /etc/fstab and remounting. Then ran quotacheck -cug /home and it completed successfully. However, users are still able to write beyond their assigned soft limits. What step is missing?

A.Setting limits with edquota.
B.Running repquota to view quotas.
C.Setting limits with setquota.
D.Running quotaon to activate quotas.
AnswerD

Quotas remain inactive until explicitly enabled; `quotacheck` only builds the quota database files (aquota.user, aquota.group), it does not enforce limits. Running `quotaon /home` activates enforcement, satisfying the stem's requirement to stop users writing beyond their soft limits.

Why this answer

The missing step is activating quotas with `quotaon`. Even after configuring `/etc/fstab` with `usrquota,grpquota`, remounting the filesystem, and running `quotacheck -cug` to create the quota database files (`aquota.user` and `aquota.group`), quotas remain inactive until explicitly enabled with `quotaon`. Without this command, the kernel does not enforce quota limits, allowing users to exceed soft limits without warning.

Exam trap

The trap here is that candidates assume running `quotacheck -cug` both creates the quota database and activates quotas, but `quotacheck` only scans and builds the database, while `quotaon` is a separate mandatory step to enable enforcement.

How to eliminate wrong answers

Option A is wrong because `edquota` is used to set quota limits for users or groups interactively, but the question states that users can write beyond soft limits, implying limits may already be set or the issue is that quotas are not active at all. Option B is wrong because `repquota` is a reporting tool to view current quota usage and limits; it does not enable quota enforcement. Option C is wrong because `setquota` is a command-line tool to set quota limits non-interactively, but like `edquota`, it only configures limits and does not activate the quota system; the missing step is `quotaon`.

52
MCQhard

An administrator needs to add a 2 GB swap area that persists across reboots on a server with no free partition space, using a file at /swapfile on the root filesystem. After creating the file with fallocate and running mkswap /swapfile, which additional actions are required to activate it now and at every boot?

A.Run swapon /swapfile and add the line '/swapfile none swap sw 0 0' to /etc/fstab.
B.Run swapon /swapfile and add the line '/swapfile none swap defaults,nofail 0 2' to /etc/fstab.
C.Run mount /swapfile and add the line '/swapfile none swap sw 0 0' to /etc/fstab.
D.Run mkswap --activate /swapfile and add the line '/swapfile swap swap sw 0 0' to /etc/fstab.
AnswerA

swapon /swapfile activates the swap area immediately for the running system, and the /etc/fstab entry with filesystem type swap and options sw ensures the kernel enables it during boot. Both steps are necessary: without swapon it is inactive now, and without the fstab line it is lost after reboot. This matches the persistence requirement.

Why this answer

A swap file is activated in the running system with swapon and made persistent by adding an fstab entry whose filesystem type is swap and whose dump and pass fields are both zero. Using mount instead of swapon, inventing a mkswap activation flag, or supplying a nonzero pass field all fail to produce a correctly activated and persistent swap area.

Exam trap

The trap here is assuming swap is enabled like a normal filesystem with mount, when the kernel uses the dedicated swapon mechanism.

53
Multi-Selecthard

An administrator is preparing a new server with two unused disks, /dev/sdb and /dev/sdc, for a software RAID 1 array that will hold customer data. Which two commands are required to create the array and make it usable? (Choose two.)

Select 2 answers
A.mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
B.mdadm --detail /dev/md0
C.pvcreate /dev/sdb /dev/sdc
D.mdadm --assemble /dev/md0 /dev/sdb /dev/sdc
E.mkfs.ext4 /dev/md0
AnswersA, E

This mdadm command creates a RAID 1 array named /dev/md0 using the two specified disks as members. It is the essential step that assembles the array. After creation, the array appears as a block device that can be partitioned or formatted. Without this command, no RAID device exists, so the remaining steps would have nothing to act on.

Why this answer

Creating a usable software RAID 1 array requires two actions: mdadm --create to build the array from the member disks, and a filesystem creation command such as mkfs.ext4 on the resulting /dev/md0 device. Assembly is only for reactivating existing arrays, and pvcreate belongs to LVM. Verification with mdadm --detail is optional.

Exam trap

The trap here is confusing mdadm --create with mdadm --assemble, since both produce an active /dev/md device but only one works on blank disks.

54
Multi-Selectmedium

Which two statements are true about LVM snapshots? (Choose two.)

Select 2 answers
A.Snapshots require the same amount of space as the original volume.
B.Snapshots are read-only by default.
C.Snapshots use copy-on-write technology.
D.Snapshots can be used to restore the original volume.
E.Snapshots are only supported on ext4 filesystems.
AnswersC, D

LVM snapshots employ copy-on-write: when a block on the origin changes, its original contents are copied to the snapshot before the write proceeds. This preserves a point-in-time view while consuming space only for modified blocks.

Why this answer

Option C is correct because LVM snapshots are implemented using copy-on-write (COW): when data on the origin logical volume is modified, the original block is copied to the snapshot's COW space before being overwritten, so the snapshot preserves the point-in-time state. Option D is correct because a snapshot can be mounted and its contents copied back to the origin (or the origin can be reverted from the snapshot with lvconvert --merge), making it a valid mechanism for restoring the original volume. Option A is wrong because a snapshot only needs enough space to hold changed blocks, not a full copy of the origin.

Option B is wrong because LVM snapshots are writable by default, though they are typically used read-only. Option E is wrong because LVM snapshots operate at the block-device layer and are filesystem-agnostic, working with ext4, XFS, and others.

Exam trap

The trap here is that candidates often assume snapshots are read-only (like many other snapshot implementations) or that they require full duplication of the source volume, but LVM snapshots are read-write by default and use copy-on-write to minimize space usage.

55
MCQhard

A storage administrator is troubleshooting a system where a new SCSI disk is detected by the kernel but not visible in /dev/disk/by-id/. What is the most likely cause?

A.The device mapper target is not set for the disk.
B.The disk does not have a valid partition table.
C.The scsi_mod kernel module is not loaded.
D.The udev daemon has not processed the device yet; run 'udevadm trigger' to generate links.
AnswerD

udev creates the persistent /dev/disk/by-id/ symlinks asynchronously after the kernel emits a uevent for the new SCSI device. The disk appearing in kernel logs confirms detection, but the by-id links only materialise once udev processes that event; running 'udevadm trigger' forces reprocessing, generating the missing symlinks.

Why this answer

When a new SCSI disk is detected by the kernel, the kernel creates the device node (e.g., /dev/sdb), but the symbolic links under /dev/disk/by-id/ are generated by udev based on the device's WWID or other identifiers. If udev has not yet processed the uevent for the new disk, those persistent by-id links will not exist. Running 'udevadm trigger' forces udev to reprocess all pending or missed uevents, which creates the missing links.

Exam trap

The trap here is that candidates assume a missing partition table or device mapper target is the cause, but the question explicitly states the disk is detected by the kernel, meaning the issue is with udev link creation, not with kernel-level detection or partitioning.

How to eliminate wrong answers

Option A is wrong because the device mapper target (e.g., dm-linear, dm-crypt) is only relevant for logical volumes or mapped devices, not for a raw SCSI disk being detected by the kernel; by-id links are created by udev for any block device regardless of device mapper. Option B is wrong because a missing partition table does not prevent the kernel from creating the base device node or udev from generating by-id links for the whole disk (e.g., /dev/disk/by-id/wwn-0x...); partition tables affect partition-level links, not the disk-level by-id links. Option C is wrong because if the scsi_mod kernel module were not loaded, the kernel would not detect the SCSI disk at all; the question states the disk is detected by the kernel, so the module must be loaded.

56
Multi-Selectmedium

An administrator is configuring LVM and wants to display information about physical volumes, volume groups, and logical volumes. Which two commands provide this information? (Choose two.)

Select 2 answers
A.pvscan, vgscan, lvscan
B.pvck, vgck, lvck
C.pvcreate, vgcreate, lvcreate
D.pvdisplay, vgdisplay, lvdisplay
E.pvs, vgs, lvs
AnswersD, E

pvdisplay, vgdisplay and lvdisplay report detailed per-object attributes for physical volumes, volume groups and logical volumes respectively, including sizes, UUIDs and allocation policy. They satisfy the requirement to inspect all three LVM layers, though the question expects only two commands.

Why this answer

Option D is correct because pvdisplay, vgdisplay, and lvdisplay are the LVM reporting commands that print detailed information about physical volumes, volume groups, and logical volumes respectively, including attributes such as size, UUID, PE size, and allocation policy. Option E is also correct because pvs, vgs, and lvs are the LVM reporting commands that produce concise, column-oriented summaries of physical volumes, volume groups, and logical volumes, making them ideal for quickly displaying this information. Option A is incorrect because pvscan, vgscan, and lvscan scan for and activate LVM metadata/devices rather than displaying detailed configuration information.

Option B is incorrect because pvck, vgck, and lvck check and repair LVM metadata consistency, not report volume information. Option C is incorrect because pvcreate, vgcreate, and lvcreate create physical volumes, volume groups, and logical volumes rather than displaying information about them.

Exam trap

The trap here is that candidates often confuse the 'scan' commands (option A) with 'display' commands, assuming that scanning also shows detailed information, when in fact `pvscan` only lists discovered PVs without showing attributes like PE size or free space.

57
MCQeasy

A junior administrator needs to add a new 2 TiB disk, /dev/sdc, to a server and create a single GPT partition that spans the entire disk. The disk currently has no partition table. Which command will create the GPT partition table and the partition in one interactive session?

A.gdisk /dev/sdc
B.fdisk /dev/sdc
C.mkfs.gpt /dev/sdc
D.parted /dev/sdc mklabel msdos
AnswerA

gdisk is an interactive GPT fdisk utility. It can create a new GPT partition table and then create a partition spanning the entire disk. It is designed specifically for GPT and handles large disks over 2 TiB. This is the appropriate tool for the scenario.

Why this answer

To create a GPT partition table and a full-disk partition on /dev/sdc, gdisk is the dedicated interactive tool. It supports GPT natively and handles large disks. fdisk may work but is traditionally MBR-oriented, mkfs.gpt is nonexistent, and the parted command shown creates an MBR label instead of GPT. gdisk is the correct choice.

Exam trap

The trap here is choosing a familiar partitioning tool without confirming it can create GPT, or mistaking GPT for a filesystem.

58
MCQhard

A large e-commerce platform runs on a database server that uses LVM thin provisioning. The thin pool is overcommitted at 200% (pool size 1TB, thin volumes total 2TB). Suddenly, the database reports write errors and performance degrades drastically. The administrator checks the system and finds that the thin pool is completely full. What is the immediate effect on the thin volumes, and what should the administrator do to restore normal operation without data loss?

A.The volumes continue to operate but with severe slowdown; administrator must delete unnecessary snapshots.
B.The volumes become corrupted; administrator must restore from backup.
C.The volumes become read-only; administrator must add more physical storage to the volume group and extend the thin pool.
D.The volumes automatically extend the pool using metadata space; no action needed.
AnswerC

When a thin pool is exhausted, the kernel queues further writes and returns errors, effectively freezing thin volumes until space is reclaimed. Extending the pool with additional physical extents from the volume group restores write capability immediately, preserving existing data because thin volumes themselves remain intact.

Why this answer

When an LVM thin pool is completely full, the kernel cannot allocate new blocks for any thin volume, so all thin volumes in that pool are automatically switched to read-only mode to prevent data corruption. The immediate fix is to add physical storage to the volume group (e.g., vgextend) and then extend the thin pool (lvextend) so that new blocks can be allocated. This restores write capability without data loss because the volumes were never corrupted—they were simply protected by the read-only state.

Exam trap

LFCS often tests the misconception that thin pools can be overcommitted indefinitely without consequences, or that volumes become corrupted rather than read-only when the pool fills.

How to eliminate wrong answers

Option A is wrong because thin volumes do not continue to operate with severe slowdown when the pool is full; they become read-only, and deleting snapshots may free space but is not the immediate action to restore write capability. Option B is wrong because the volumes are not corrupted; LVM thin provisioning sets them read-only to prevent corruption, so a backup restore is unnecessary. Option D is wrong because metadata space is not used to automatically extend the pool; metadata is separate and does not provide data blocks, and no automatic extension occurs.

59
MCQeasy

A junior administrator needs to mount the XFS filesystem on /dev/sdb1 at /srv/files for the current session only, without creating a persistent entry. Which command accomplishes this?

A.systemctl start srv-files.mount
B.mount -t xfs /dev/sdb1 /srv/files
C.mount /dev/sdb1 /srv/files >> /etc/fstab
D.mkfs.xfs /dev/sdb1 /srv/files
AnswerB

mount attaches the filesystem on /dev/sdb1 at the /srv/files directory for the running session, and -t xfs explicitly selects the XFS driver. Because no entry is added to /etc/fstab, the mount disappears after reboot, matching the 'current session only' requirement. The mount point must already exist as a directory.

Why this answer

A one-off mount for the current session is performed with the mount command, specifying the device, the existing mount point, and optionally the filesystem type via -t. No fstab entry is created, so the mount does not survive a reboot. Formatting tools, shell redirection into fstab, and starting nonexistent systemd units do not mount a filesystem for the current session.

Exam trap

The trap here is mixing up mounting a filesystem with persistently configuring it in /etc/fstab or a systemd mount unit.

60
MCQmedium

A system administrator needs to ensure that the /dev/sdb1 filesystem is automatically mounted at /data with the noatime option at boot. The filesystem's UUID is known. Which entry in /etc/fstab is correct?

A.UUID=1234-5678 /data ext4 defaults,noatime 0 2
B.UUID=1234-5678 /data ext4 noatime 0 2
C./dev/sdb1 /data ext4 defaults,noatime 0 1
D.UUID=1234-5678 /data ext4 defaults,noatime 1 2
AnswerA

This entry uses the UUID to identify the filesystem, specifies the mount point /data, the filesystem type ext4, and includes the noatime option along with defaults. The dump field is 0 and the pass field is 2, which is appropriate for a non-root filesystem. This ensures the filesystem is mounted at boot with the desired option.

Why this answer

The correct /etc/fstab entry must use the UUID for stable identification, specify the mount point, filesystem type, include defaults and noatime in the options, and set the dump and pass fields appropriately (0 and 2 for a non-root filesystem). The entry with UUID, defaults,noatime, 0, and 2 meets all these criteria.

Exam trap

The trap here is forgetting to include defaults alongside noatime, or using the wrong pass number (1 instead of 2) for a non-root filesystem, which can cause boot issues.

61
MCQeasy

An administrator wants to see the disk usage of the /var directory in a human-readable format. Which command should be used?

A.du -sh /var
B.df -h /var
C.fdisk -l /var
D.ls -lh /var
AnswerA

The -s flag summarises /var into a single total, while -h renders sizes in human-readable units such as K, M and G. Together they satisfy the stem's requirement for human-readable disk usage of that directory.

Why this answer

The `du -sh /var` command is correct because `du` (disk usage) estimates file and directory space usage, and the `-s` flag summarizes the total for `/var` while `-h` provides human-readable output (e.g., KiB, MiB, GiB). This directly shows the disk space consumed by the `/var` directory and its contents.

Exam trap

The trap here is confusing `du` (directory usage) with `df` (filesystem usage), leading candidates to pick `df -h /var` because it shows space in human-readable format, but it does not measure the directory's own consumption.

How to eliminate wrong answers

Option B is wrong because `df -h /var` shows the free and used space on the filesystem where `/var` is mounted, not the disk usage of the `/var` directory itself. Option C is wrong because `fdisk -l /var` is invalid; `fdisk` operates on block devices (e.g., `/dev/sda`), not directories, and will produce an error. Option D is wrong because `ls -lh /var` lists the contents of `/var` with file sizes, but does not aggregate or summarize the total disk usage of the directory tree.

62
MCQeasy

A junior administrator has a USB flash drive at /dev/sdb that will be used exclusively as a data disk on a Linux server. They need to create an XFS filesystem on the whole device (no partitions). Which command accomplishes this?

A.xfs_growfs /dev/sdb
B.mkfs -t xfs -c /dev/sdb
C.xfs_repair /dev/sdb
D.mkfs.xfs /dev/sdb
AnswerD

mkfs.xfs is the correct tool to create an XFS filesystem, and it accepts a whole block device such as /dev/sdb as its target. XFS supports being created directly on an unpartitioned device, which is valid for dedicated data disks. This command writes the XFS superblock and metadata to /dev/sdb, making it immediately mountable.

Why this answer

Creating an XFS filesystem on a whole block device is done with the mkfs.xfs command followed by the device path. XFS is commonly used for data volumes and supports being placed directly on an unpartitioned disk. The other commands either grow or repair an existing XFS filesystem and cannot initialize a new one.

Exam trap

The trap here is assuming that a filesystem must always be created on a partition rather than directly on a whole block device.

63
MCQmedium

An administrator is troubleshooting a server with a software RAID 1 array on /dev/md0. One disk, /dev/sdc, has failed and been replaced. The administrator runs `mdadm /dev/md0 --add /dev/sdc1` and sees the array rebuilding, but after a reboot the new disk is no longer part of the array. Which action should the administrator take to ensure the replacement disk is automatically reassembled into the array at boot?

A.Add an entry for /dev/sdc1 to /etc/fstab with the `nofail` option.
B.Run `mdadm --grow /dev/md0 --raid-devices=2` to force the array to accept the new disk.
C.Run `mdadm --assemble --scan` and rely on the kernel to remember the array across reboots.
D.Run `mdadm --detail --scan >> /etc/mdadm.conf` and update the initramfs.
AnswerD

The mdadm.conf file tells the initramfs and mdadm which arrays to assemble at boot. Appending the current scan output records the new array UUID and device list, and updating the initramfs embeds that configuration so the array is reassembled with the replacement disk after a reboot.

Why this answer

Software RAID arrays are reassembled at boot from configuration stored in /etc/mdadm.conf and embedded in the initramfs. After adding a replacement disk, the administrator must regenerate that configuration and rebuild the initramfs so the new member is recognized. Growing the array, adding the component to fstab, or relying on a manual assemble command does not provide persistent boot-time assembly.

Exam trap

The trap here is assuming that adding a disk to a running array automatically updates the boot-time assembly configuration.

64
MCQhard

An administrator is troubleshooting a server where the root filesystem is on an LVM logical volume. The system fails to boot and drops to an initramfs prompt with the error 'Volume group "vg_root" not found'. The administrator verifies that the physical volumes are present and the volume group exists when booting from a rescue disk. Which action is most likely to resolve the boot issue?

A.Edit /etc/lvm/lvm.conf to set the 'locking_type' to 0 and rebuild the initramfs.
B.Run vgchange -ay vg_root from the initramfs prompt and then continue booting.
C.Recreate the initramfs with the appropriate LVM configuration and modules included.
D.Add the volume group to /etc/fstab with the 'noauto' option to prevent automatic activation.
AnswerC

The error indicates that the initramfs cannot find the volume group, likely because the LVM configuration or modules are missing from the initramfs. Rebuilding the initramfs with the correct LVM support, such as using dracut or update-initramfs, will ensure that the volume group is activated during early boot. This resolves the root cause permanently.

Why this answer

The error indicates that the initramfs is not activating the volume group during early boot. This usually happens when the initramfs was built without the necessary LVM modules or configuration, or after a kernel update that did not include LVM support. Rebuilding the initramfs with the correct LVM configuration ensures the volume group is found and activated, allowing the system to boot.

Exam trap

The trap here is thinking that manually activating the volume group from the initramfs prompt is a permanent fix, when it only temporarily bypasses the real issue of missing LVM support in the initramfs.

65
Multi-Selecthard

An administrator manages a server with several iSCSI LUNs attached. The server reboots after a kernel update, and one of the LUNs, which previously appeared as /dev/sdc, is now enumerated as /dev/sdd, breaking an /etc/fstab entry that references /dev/sdc. The administrator wants to make the mount configuration resilient to device-name changes and to avoid boot delays if the LUN is temporarily missing. Which two actions should the administrator take? (Choose two.)

Select 2 answers
A.Add the nofail mount option to the /etc/fstab entry for that filesystem.
B.Add the _netdev mount option to the /etc/fstab entry and rely on the device name /dev/sdc.
C.Replace the /dev/sdc reference in /etc/fstab with a persistent identifier such as /dev/disk/by-uuid/<uuid> or /dev/disk/by-path/<path>.
D.Change the mount point to use the device-mapper path /dev/mapper/sdc1 instead of /dev/sdc.
E.Create a udev rule that renames the LUN to /dev/sdc every time it is detected.
AnswersA, C

The nofail option tells systemd and mount to treat a missing device as a non-fatal condition during boot. Without it, a temporarily absent iSCSI LUN can drop the system into emergency mode or cause long timeouts. With nofail, the boot continues and the mount is simply skipped, which is the desired behavior for storage that may not always be present at boot time. It is commonly paired with persistent identifiers.

Why this answer

Persistent identifiers such as UUIDs or by-path symlinks decouple the mount configuration from the kernel's enumeration order, and nofail prevents a temporarily missing iSCSI LUN from delaying or blocking boot. Together they make the fstab entry resilient to device renumbering. Changing to a device-mapper path, adding _netdev, or forcing a udev rename do not address enumeration stability and can introduce new problems.

Exam trap

The trap here is believing that a udev rename or a device-mapper path provides stable naming, when the supported and reliable approach is to use the existing by-uuid or by-path symlinks plus nofail.

66
MCQeasy

A junior administrator needs to identify the filesystem type of the device /dev/nvme0n1p2 on a running Linux server without mounting it or modifying any metadata. Which command should be used?

A.blkid /dev/nvme0n1p2
B.lsblk -f
C.mount /dev/nvme0n1p2 /mnt
D.fdisk -l /dev/nvme0n1p2
AnswerA

blkid probes the device for filesystem signatures and prints attributes such as TYPE and UUID. It reads the superblock directly and does not mount the filesystem or change anything on disk. This makes it the appropriate, low-risk tool for identifying whether /dev/nvme0n1p2 holds XFS, ext4, swap, or another filesystem, which is precisely what the administrator needs in this situation.

Why this answer

blkid reads filesystem superblocks and reports the type without mounting or altering the device, making it the safest and most direct way to identify the filesystem on /dev/nvme0n1p2. fdisk shows partition-table type codes rather than real filesystem metadata, mounting is unnecessarily invasive, and lsblk -f is a broader listing that is less targeted for a single-device query.

Exam trap

The trap here is confusing the partition-table type code shown by fdisk with the actual filesystem type, which only a superblock probe such as blkid can confirm.

67
Multi-Selectmedium

An administrator needs to add a new swap space to a running Linux server without rebooting. The server has a free partition /dev/sdc1 and an existing file /swapfile. Which two commands or steps are required to activate the new swap partition /dev/sdc1 immediately? (Choose two.)

Select 2 answers
A.swapoff /dev/sdc1
B.mount -t swap /dev/sdc1 /mnt
C.echo '/dev/sdc1 none swap sw 0 0' >> /etc/fstab
D.swapon /dev/sdc1
E.mkswap /dev/sdc1
AnswersD, E

swapon activates the swap partition, making it available to the kernel for paging. After mkswap has initialized the partition, swapon enables it immediately without a reboot. This is the second required step to bring the new swap space online.

Why this answer

To activate a new swap partition immediately, you must first initialize it with mkswap, then enable it with swapon. These two commands prepare and activate the swap space without requiring a reboot. Adding an fstab entry is for persistence across reboots, and swapoff or mount are not appropriate for enabling swap.

Exam trap

The trap here is confusing the steps for immediate activation with the steps for persistent configuration, such as editing /etc/fstab.

68
MCQhard

An administrator needs to add a new 8 GB swap area on a server that already has a 2 GB swap partition. The system has free space in the volume group vg_sys. Which command creates a logical volume named lv_swap of exactly 8 GB and prepares it for swap use?

A.lvcreate -L 8G -n lv_swap vg_sys && mkswap /dev/vg_sys/lv_swap && swapon /dev/vg_sys/lv_swap
B.vgcreate -L 8G -n lv_swap vg_sys && mkswap /dev/vg_sys/lv_swap && swapon /dev/vg_sys/lv_swap
C.lvcreate -L 8G -n lv_swap vg_sys && mkfs.swap /dev/vg_sys/lv_swap && swapon /dev/vg_sys/lv_swap
D.lvcreate -l 8 -n lv_swap vg_sys && mkswap /dev/vg_sys/lv_swap && swapon -a
AnswerA

lvcreate -L 8G -n lv_swap vg_sys creates the 8 GB logical volume in the specified volume group, mkswap writes the swap signature, and swapon activates it immediately. This is the complete correct sequence for adding a swap LV. To persist across reboots, an entry in /etc/fstab would also be needed, but the question asks about creating and preparing the area.

Why this answer

The correct procedure is to create the logical volume with lvcreate -L 8G -n lv_swap vg_sys, initialize it with mkswap, and activate it with swapon. The -L option specifies an absolute size in gigabytes, which matches the 8 GB requirement. Persistent activation requires an /etc/fstab entry, but the immediate creation and activation sequence is as shown.

Exam trap

The trap here is confusing the lvcreate -l (lowercase, extents) and -L (uppercase, size) options, which leads to creating a volume far smaller than intended.

69
MCQmedium

A storage administrator is preparing a 4 TB USB 3.0 external drive to hold large backup archives. The drive must be usable on Linux, Windows, and macOS workstations, and single files will occasionally exceed 4 GB. Which filesystem should be created on the single partition /dev/sdb1?

A.mkfs.exfat /dev/sdb1
B.mkfs.vfat -F 32 /dev/sdb1
C.mkfs.ext4 /dev/sdb1
D.mkfs.xfs /dev/sdb1
AnswerA

exFAT is the only filesystem in this list natively read/written by current Linux, Windows, and macOS releases, and it supports files far larger than 4 GB, which FAT32 cannot. It is the correct choice for a shared external backup drive that must move between all three platforms without extra drivers.

Why this answer

exFAT was designed for flash and removable media and is supported out of the box by modern Linux, Windows, and macOS. It also has no 4 GB per-file ceiling, unlike FAT32, so it satisfies both the cross-platform and large-file requirements. The other filesystems either impose a size limit or lack native support on one of the required operating systems.

Exam trap

The trap here is assuming that any cross-platform filesystem will do and picking FAT32, forgetting its 4 GiB per-file limit.

70
MCQmedium

A server has a new disk /dev/sdd that must be mounted at /backup and automatically mounted at boot. The administrator creates a GPT partition table, a single partition /dev/sdd1, and an ext4 filesystem. Which /etc/fstab entry correctly uses a persistent identifier for the filesystem?

A.LABEL=backup /backup xfs defaults 0 2
B.UUID=1234-abcd /backup ext4 defaults 0 2
C./dev/sdd1 /backup ext4 defaults 0 2
D.UUID=1234-abcd /backup ext4 noauto 0 2
AnswerB

Using UUID= in /etc/fstab references the filesystem by its unique identifier, which remains stable even if device names change or disks are reordered. The mount point, filesystem type, options, and dump/pass fields are all valid. The pass value of 2 schedules fsck after the root filesystem during boot, which is appropriate for a non-root filesystem.

Why this answer

Persistent mounting in /etc/fstab should use a stable identifier such as UUID= or LABEL= rather than a kernel device name. The entry must also specify the correct filesystem type and avoid options like noauto that prevent boot-time mounting. The UUID form with ext4 and a pass value of 2 satisfies all requirements.

Exam trap

The trap here is choosing a device path like /dev/sdd1, which looks simple and works immediately but is not persistent across hardware changes.

71
MCQhard

An administrator is configuring an NFS server and wants to export /srv/data to a specific client, 192.168.10.25, with read-write access, while ensuring that the client's root user is mapped to the anonymous user for security. Which entry should be placed in /etc/exports?

A./srv/data 192.168.10.25(rw,no_root_squash)
B./srv/data *(rw,root_squash)
C./srv/data 192.168.10.25(ro,root_squash)
D./srv/data 192.168.10.25(rw,root_squash)
AnswerD

This entry grants read-write access to the specified client and enables root_squash, which maps the client's root user to the anonymous user (typically nobody). This is the default behavior in many NFS implementations, but explicitly specifying it ensures security. It correctly restricts access to the single client and applies the required root squashing.

Why this answer

The correct export entry must specify the exact client, grant read-write access, and enable root squashing. The entry /srv/data 192.168.10.25(rw,root_squash) accomplishes all three requirements. root_squash is the default, but explicitly including it ensures the security policy is applied even if defaults change.

Exam trap

The trap here is confusing root_squash with no_root_squash, or using a wildcard that opens the export to all clients instead of restricting it to the specified host.

72
Multi-Selectmedium

Which THREE steps are required to create a new ext4 filesystem on /dev/sdc1 and ensure it is automatically mounted at /mnt/data at boot? (Choose three.)

Select 3 answers
A.e2label /dev/sdc1 data
B.mkfs.ext4 /dev/sdc1
C.mkdir /mnt/data
D.mount /dev/sdc1 /mnt/data
E.add entry to /etc/fstab for /dev/sdc1
AnswersB, C, E

Running `mkfs.ext4 /dev/sdc1` writes a fresh ext4 superblock, inode tables and journal directly onto the partition, satisfying the stem's requirement to create the filesystem. Without this formatting step, no ext4 structure exists for the later mount at /mnt/data, so the remaining steps would fail.

Why this answer

Option B (mkfs.ext4 /dev/sdc1) is correct because mkfs.ext4 is the command that actually creates a new ext4 filesystem on the specified partition, which is the core requirement of the task. Option C (mkdir /mnt/data) is correct because the mount point directory must exist before the filesystem can be mounted there, and /mnt/data is not guaranteed to exist by default. Option E (add entry to /etc/fstab for /dev/sdc1) is correct because /etc/fstab is the system configuration file that defines filesystems to be mounted automatically at boot, so an entry mapping /dev/sdc1 to /mnt/data is required for persistent mounting.

Option A (e2label /dev/sdc1 data) is not required because labeling the filesystem is optional and not necessary to create or auto-mount it. Option D (mount /dev/sdc1 /mnt/data) is not required as a step for boot-time mounting, since the fstab entry handles mounting at boot; a manual mount would only be needed to use it immediately without rebooting.

Exam trap

The trap here is that candidates often confuse the temporary `mount` command (which does not persist across reboots) with the permanent configuration required in /etc/fstab, and may also mistakenly think setting a filesystem label is a required step for creating or mounting a filesystem.

Ready to test yourself?

Try a timed practice session using only Storage Management questions.