CCNA Storage Management Questions

75 of 78 questions · Page 1/2 · Storage Management topic · 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

Correct command.

Why this answer

Option B is correct because 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
MCQmedium

A server’s root filesystem on LVM is nearly full. The administrator has added a new 20GB disk and created a physical volume on it. They added the PV to the volume group containing root, then extended the root logical volume by 10GB. Next, they ran resize2fs on the mounted root filesystem. After the resize, the server continues to function. However, upon reboot, the system fails to boot and enters emergency mode. What is the most likely cause?

A.The GRUB configuration is missing the new kernel.
B.The /etc/fstab entry for root is incorrect.
C.The filesystem was not resized correctly.
D.The initramfs needs to be regenerated to include the new disk.
AnswerD

Correct: Adding a PV may require initramfs rebuild to ensure LVM tools are present.

Why this answer

Option B is correct because adding a new PV may change the order of LVM devices; the initramfs must include the LVM tools to mount root, and rebuilding it ensures the new PV is recognized. Option A is unlikely since resize2fs worked. Option C is not related to the disk addition.

Option D fstab is unchanged and should still work.

3
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 shared-disk filesystem for Linux clusters.

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.

4
MCQmedium

After adding a new SCSI disk to a server running Linux, the system fails to boot with the error: 'Kernel panic - not syncing: VFS: Unable to mount root fs'. The root filesystem is on LVM. What is the most likely cause?

A.The /etc/fstab entry for the new disk is missing.
B.The GRUB configuration is incorrect.
C.The new disk's partition table is corrupt.
D.The initramfs was not regenerated after the disk addition, missing LVM tools.
AnswerD

Correct: initramfs needs to include LVM support; adding disk may change device order and require initramfs rebuild.

Why this answer

Option A is correct because adding a disk may change device ordering; the initramfs must include LVM tools to mount root. If the initramfs is not rebuilt, it may lack the necessary modules. Option B is about the new disk, but root is on LVM and still missing.

Option C fstab for new disk is irrelevant. Option D GRUB config is not typically affected by disk addition.

5
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

Correct: mount with noexec option.

Why this answer

Options A and D are correct. Option A uses mount -o at command line. Option D uses fstab with 'noexec' option.

Option B uses mount --bind which doesn't set noexec by itself. Option C uses 'defaults' which does not include noexec. Option E uses 'exec' which is opposite.

6
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

Correct: Online extension without unmount.

Why this answer

Option B is correct because lvextend -l +100%FREE extends the logical volume to use all free space in the volume group, and resize2fs can grow the ext4 filesystem online (without unmounting). Option A unmounts unnecessarily. Option C adds a new disk which is not needed.

Option D creates a separate volume but does not consolidate space.

7
MCQmedium

Refer to the exhibit. Which device is the root filesystem mounted from?

A./dev/sda2
B./dev/sdb
C./dev/sdb1
D./dev/sda1
AnswerA

Mounted on /.

Why this answer

Option B is correct because the MOUNTPOINT column shows '/' for /dev/sda2. Option A is /boot. Option C is /home.

Option D is the whole disk sdb, not a partition.

8
MCQhard

You are a Linux administrator at a mid-sized company. The company runs a critical PostgreSQL database on a server running CentOS 7. The database stores its data on a 500GB logical volume (lv_pgdata) in volume group vg_pg. The filesystem is XFS. Recently, the database team reports that write performance is degrading, and the disk is nearly full (95% usage). You have added a new 200GB SSD to the server, and you need to increase the storage capacity and improve write performance for the database. The database can tolerate a brief downtime (less than 5 minutes) for maintenance. You want to use LVM to add the new SSD as a physical volume, extend the volume group, and then extend the logical volume and filesystem. Additionally, you want to improve write performance by placing the frequently written database transaction log on a separate faster storage. However, the database configuration expects the transaction log to be in a subdirectory of the data directory. You have the following options: A. Create a new logical volume for the transaction log, format it as XFS, mount it on the data directory's subdirectory, and move the log files. B. Add the SSD as a PV, extend vg_pg, extend lv_pgdata, and then use LVM's pvmove to move all extents to the SSD. C. Add the SSD as a PV, create a new VG, create a new LV for the transaction log, format as ext4, mount, and reconfigure the database. D. Use LVM's striping (RAID 0) across the existing HDD and new SSD to improve performance, then extend the filesystem. Which option best meets the requirements of increasing capacity and improving write performance with minimal downtime?

A.Add the SSD as a PV, extend vg_pg, extend lv_pgdata and resize the filesystem for capacity. Then create a new LV on the SSD, format as XFS, mount it on the transaction log subdirectory, move the log files, and update the database configuration to point to the new location.
B.Add the SSD as a PV, extend vg_pg, extend lv_pgdata and resize the filesystem for capacity. Then use pvmove to move all data to the SSD, leaving the HDD unused.
C.Use LVM's striping (RAID 0) across the existing HDD and new SSD to improve performance, then extend the filesystem.
D.Add the SSD as a PV, create a new VG and LV for the transaction log, format as ext4, mount, and reconfigure the database to use the new location.
AnswerA

This increases capacity and isolates log writes to SSD, improving performance with minimal downtime.

Why this answer

Option A is correct because it directly addresses both requirements: increasing capacity by extending the existing logical volume and filesystem using the new SSD as a PV, and improving write performance by isolating the database transaction log onto the faster SSD via a separate LV mounted on the expected subdirectory. This approach minimizes downtime (under 5 minutes) by performing the resize and mount operations quickly, and it respects the database's configuration expectation that the transaction log resides in a subdirectory of the data directory.

Exam trap

The trap here is that candidates may confuse 'improving performance' with 'moving all data to the SSD' (Option B) or 'striping across devices' (Option C), failing to recognize that isolating the write-intensive transaction log onto the faster SSD is a more targeted and effective performance optimization that also preserves the existing capacity increase.

How to eliminate wrong answers

Option B is wrong because pvmove moves all extents to the SSD, leaving the HDD unused, which fails to increase total storage capacity (the HDD is not utilized) and does not isolate the transaction log for performance gains. Option C is wrong because striping (RAID 0) across HDD and SSD would tie performance to the slower HDD, negating the SSD's speed advantage, and it does not address isolating the transaction log; additionally, extending an existing striped LV with a new device requires complex reconfiguration and risks data loss. Option D is wrong because creating a new VG and formatting the transaction log LV as ext4 introduces unnecessary complexity and potential compatibility issues (the existing filesystem is XFS), and it does not increase the capacity of the data logical volume, only adding a separate volume for logs.

9
MCQeasy

A Linux administrator needs to view the UUID and filesystem type of all block devices. Which command provides this information?

A.blkid
B./proc/partitions
C.ls -l /dev
D.fdisk -l
AnswerA

Correct command.

Why this answer

The `blkid` command is the correct tool because it directly queries the kernel's block device attributes via the libblkid library, displaying the UUID, filesystem type (e.g., ext4, xfs), and other metadata (like LABEL or PARTUUID) for all block devices. It reads from the `/dev/disk/by-uuid/` symlinks and the kernel's device mapper, making it the standard utility for this specific task.

Exam trap

The trap here is that candidates confuse `fdisk -l` (which shows partition table info) with `blkid` (which shows filesystem metadata), assuming the partition type code (e.g., 0x83) is equivalent to the filesystem type.

How to eliminate wrong answers

Option B is wrong because `/proc/partitions` only lists partition major/minor numbers, block size, and partition name—it does not show UUIDs or filesystem types. Option C is wrong because `ls -l /dev` lists device node files (e.g., /dev/sda) with their major/minor numbers and permissions, but it never displays filesystem metadata like UUID or type. Option D is wrong because `fdisk -l` shows partition table layout (start/end sectors, partition IDs) but does not query the filesystem for UUID or type; it only reads the MBR or GPT partition table, not the filesystem superblock.

10
Multi-Selecthard

Which THREE of the following are valid methods to mount an NFS filesystem on a client?

Select 3 answers
A.echo 'server:/export /mnt nfs defaults 0 0' >> /etc/fstab && mount -a
B.mount -o hard,intr server:/export /mnt
C.mount -t cifs server:/share /mnt
D.mount -t nfs server:/export /mnt
E.mount -t nfs4 server:/export /mnt
AnswersB, D, E

Correct: NFS mount with options.

Why this answer

Option B is correct because the `mount` command with `-o hard,intr` specifies NFS-specific mount options: `hard` ensures that NFS operations retry indefinitely until the server responds, and `intr` allows signals to interrupt a hung NFS operation. The command `mount -o hard,intr server:/export /mnt` uses the default NFS version (typically NFSv3) and is a valid method to mount an NFS filesystem on a client.

Exam trap

The trap here is that candidates may confuse NFS with CIFS/SMB (option C) or forget that `mount -t nfs4` is a valid alternative to `mount -t nfs` for NFSv4 exports, while option A is a valid configuration method but not a direct mount command as the question implies.

11
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

Correct sequence: pvcreate then vgextend.

Why this answer

Option B is correct because 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.

12
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 displays UUID, type, and LABEL of filesystems.

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.

13
MCQmedium

A disk in a RAID5 array fails. The array is assembled using mdadm. Which is the correct procedure to replace the failed disk with a new one?

A.Physically replace the disk, then run 'mdadm --add /dev/md0 /dev/sdb'.
B.Run 'mdadm --replace /dev/md0 /dev/sdb' with the new disk path.
C.Run 'mdadm --fail /dev/md0 /dev/sdb', then 'mdadm --remove /dev/md0 /dev/sdb', then physically replace, then 'mdadm --add /dev/md0 /dev/sdb'.
D.Hot-swap the disk and the array automatically recovers.
AnswerC

Correct step-by-step procedure.

Why this answer

Option C is correct because it follows the proper mdadm procedure for replacing a failed disk in a RAID5 array. First, you must mark the disk as failed with 'mdadm --fail' to ensure the array stops using it, then remove it with 'mdadm --remove' to detach it from the array. After physically replacing the disk, you add the new disk with 'mdadm --add', which triggers a rebuild of the array from the remaining disks' parity data.

Exam trap

The trap here is that candidates assume a hot-swap or a single '--add' command is sufficient, but the LFCS exam expects the full three-step procedure to ensure the array state is properly managed before introducing a new disk.

How to eliminate wrong answers

Option A is wrong because it omits the critical steps of failing and removing the old disk before adding the new one; simply adding a new disk without first failing the old one can cause conflicts or data corruption. Option B is wrong because 'mdadm --replace' is not a valid mdadm command; the correct approach uses '--fail', '--remove', and '--add' sequentially. Option D is wrong because RAID5 does not automatically recover from a hot-swap; you must manually fail, remove, and add the disk, and the array rebuilds only after the new disk is added.

14
MCQhard

A system administrator receives a report that a server with an ext4 filesystem becomes unresponsive when a particular process writes a large file. The root filesystem is not full. Which of the following is the most likely cause?

A.The journal size is too large and causes excessive disk writes.
B.The filesystem is mounted with the 'noatime' option, causing frequent access time updates.
C.The filesystem has experienced a corruption; running 'fsck' may resolve the issue.
D.The hard disk has developed bad sectors that affect only that file's location.
AnswerC

Corruption can cause I/O hangs.

Why this answer

Option C is correct because filesystem corruption can cause the system to hang when a process attempts to write to a damaged area, even if the filesystem is not full. The ext4 journal may replay inconsistent metadata, leading to an I/O stall. Running 'fsck' can detect and repair such corruption, restoring normal operation.

Exam trap

The trap here is that candidates assume a full filesystem is the only cause of write-related hangs, overlooking that filesystem corruption can cause the kernel to stall on journal replay or metadata operations even when space is available.

How to eliminate wrong answers

Option A is wrong because a journal that is too large does not cause excessive disk writes; ext4's journal size is fixed at creation (default 128 MB) and only records metadata changes, not data writes, so it would not cause unresponsiveness from a large file write. Option B is wrong because mounting with 'noatime' disables access time updates, which reduces disk writes, not increases them; this option would improve performance, not cause unresponsiveness. Option D is wrong because bad sectors are handled by the disk's internal remapping (via S.M.A.R.T.) and would typically cause I/O errors or read/write failures, not system-wide unresponsiveness; the filesystem would report errors for that specific file, not hang the entire server.

15
MCQmedium

Refer to the exhibit. The administrator wants to extend the /data filesystem by an additional 10GB. The volume group vg_data has only 1GB of free physical extents. Which action should be taken first?

A.Delete the /backup logical volume to free space.
B.Add /dev/sdc as a physical volume and extend vg_data.
C.Reduce the size of /backup to free space in vg_data.
D.Create a new logical volume from the free space in vg_data.
AnswerB

Correct first step.

Why this answer

The /data filesystem needs an additional 10GB, but vg_data has only 1GB of free physical extents. To extend the logical volume, the volume group must have sufficient free physical extents. Adding /dev/sdc as a physical volume and extending vg_data increases the pool of physical extents, making the required space available.

This is the correct first step because you cannot extend a logical volume beyond the available free extents in its volume group.

Exam trap

Linux Foundation often tests the misconception that you can extend a logical volume without first ensuring the volume group has enough free physical extents, leading candidates to choose options that attempt to manipulate existing volumes (like shrinking or deleting) instead of adding new storage capacity.

How to eliminate wrong answers

Option A is wrong because deleting the /backup logical volume would free space in vg_data, but it is a destructive action that removes the filesystem and data; the question asks for the first action to extend /data, not to destroy another volume. Option C is wrong because reducing the size of /backup requires that the filesystem and logical volume support shrinking (e.g., ext4 with resize2fs, or XFS which cannot be shrunk), and even if possible, it would only free a limited amount of space, not necessarily 10GB, and is more complex than adding a new physical volume. Option D is wrong because creating a new logical volume from the free space in vg_data would consume the only 1GB available, leaving no space to extend /data; the goal is to extend /data, not create a separate volume.

16
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

Correct command.

Why this answer

Option A is correct because 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.

17
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

Lists all block devices.

Why this answer

The `lsblk` command lists all available block devices (e.g., disks, partitions, LVM volumes) by reading the sysfs filesystem, providing a tree-like view of device hierarchy. The `fdisk -l` command displays the partition table for all block devices, showing detailed information about disk geometry and partitions. Both commands are standard tools for identifying block devices on a Linux system.

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.

18
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 lists all block devices, including /dev/sdb, and does not require root.

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.

19
Multi-Selecthard

Which THREE are valid reasons to use a swap file instead of a swap partition? (Choose three.)

Select 3 answers
A.Can be placed on a filesystem that supports sparse files.
B.Required for hibernation (suspend-to-disk).
C.Easier to manage in virtualized environments.
D.Faster performance than swap partition.
E.Easier to resize without repartitioning.
AnswersA, C, E

Sparse files save space until used.

Why this answer

Option A is correct because swap files can be placed on filesystems that support sparse files (e.g., ext4, XFS). A sparse file allocates disk blocks only when data is written, allowing a large swap file to be created without consuming the full physical disk space immediately. This is useful for systems where disk space is at a premium or where swap size needs to be overcommitted.

Exam trap

The trap here is that candidates often assume swap files are always slower than swap partitions, but the question asks for valid reasons to use a swap file, and performance is not one of them; the key is recognizing that swap files offer flexibility (sparse files, resizing, virtualization) at the cost of a slight performance penalty.

20
MCQeasy

An administrator wants to extend a logical volume named 'lv_data' in volume group 'vg_data' by 5GB. The volume group has free physical extents. Which command should be used?

A.pvextend -L +5G /dev/vg_data/lv_data
B.lvextend -L +5G /dev/vg_data/lv_data
C.lvresize -L +5G /dev/vg_data/lv_data
D.lvextend -L 5G /dev/vg_data/lv_data
AnswerB

The + sign indicates adding space.

Why this answer

The correct command to extend a logical volume is `lvextend`. Option B uses the correct syntax with the `-L +5G` flag, which adds 5GB to the existing logical volume `/dev/vg_data/lv_data`. The volume group `vg_data` has free physical extents, so the extension can proceed without needing to add new physical volumes.

Exam trap

The trap here is that candidates may confuse `lvextend` with `lvresize` or forget the `+` sign in the size specification, leading them to choose Option C or D, or they might incorrectly use `pvextend` (Option A) which does not exist in LVM.

How to eliminate wrong answers

Option A is wrong because `pvextend` is not a valid LVM command; the correct command for extending a logical volume is `lvextend`, not `pvextend`. Option C is wrong because `lvresize` can resize a logical volume, but it is not the standard command for extending; `lvextend` is the dedicated command, and using `lvresize` without the `-r` flag may not resize the filesystem automatically, which is a common pitfall. Option D is wrong because `-L 5G` sets the logical volume to exactly 5GB, not adding 5GB; the `+` sign is required to specify an increase in size.

21
MCQhard

A Linux administrator needs to create a RAID 5 array using three disks: /dev/sdb, /dev/sdc, and /dev/sdd, each 2TB. The administrator wants to ensure the array can be reassembled automatically after a reboot. Which command should be used to create the array?

A.mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd --metadata=0.90
B.mdadm --create /dev/md0 --level=1 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd
C.mdadm --create /dev/md0 --level=0 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd
D.mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd --metadata=1.2
AnswerD

Correct for RAID 5 with metadata 1.2, supporting large disks and auto-assembly.

Why this answer

Option D is correct because it uses `--metadata=1.2`, which stores the superblock at a standard 4 KiB offset from the start of each device, enabling the kernel to automatically discover and assemble the RAID array on reboot without manual intervention. RAID 5 with three disks provides striping with distributed parity, offering a balance of performance and redundancy.

Exam trap

The trap here is that candidates often choose `--metadata=0.90` (option A) because it is older and familiar, but they overlook that it does not support automatic reassembly on boot, which is explicitly required in the question.

How to eliminate wrong answers

Option A is wrong because `--metadata=0.90` stores the superblock at the end of the device, which is not automatically scanned by the kernel during boot, requiring manual assembly or configuration in `/etc/mdadm/mdadm.conf`. Option B is wrong because `--level=1` creates a RAID 1 mirror, which with three devices would result in a mirrored set (not RAID 5) and does not meet the requirement for a RAID 5 array. Option C is wrong because `--level=0` creates a RAID 0 stripe set with no parity or redundancy, which provides no fault tolerance and is not suitable for the stated goal of a RAID 5 array.

22
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

Correct: lvextend increases LV capacity, resize2fs expands the filesystem online.

Why this answer

Option D is correct because 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.

23
MCQhard

The administrator wants to create a new logical volume of 5GB for /var/log. Which of the following is the most appropriate first step?

A.Use lvresize to shrink lv_root by 5G and then create lv_var_log
B.Add a new disk (e.g., /dev/sdc) to the system, create a PV, and extend vg_root.
C.Mount a new filesystem directly on a new partition /dev/sdc1
D.Use lvcreate -L 5G vg_root -n lv_var_log
AnswerB

This provides free space to create the new LV.

Why this answer

Option B is correct because the volume group vg_root currently has no free space to create a new logical volume. Adding a new disk, creating a physical volume (PV) on it, and extending vg_root with vgextend provides the necessary free extents. Only then can lvcreate be used to create the 5GB lv_var_log logical volume for /var/log.

Exam trap

The trap here is that candidates assume lvcreate can always create a new logical volume in an existing volume group, forgetting that the VG must have sufficient free space; they overlook the prerequisite of adding a new PV when the VG is full.

How to eliminate wrong answers

Option A is wrong because lvresize to shrink lv_root is risky and unnecessary; it also does not add free space to the volume group if the filesystem is not shrunk first, and it may cause data loss or filesystem corruption. Option C is wrong because mounting a new filesystem directly on a partition bypasses LVM entirely, which contradicts the requirement to create a logical volume. Option D is wrong because lvcreate will fail if vg_root does not have at least 5GB of free extents; the command itself is correct syntax but cannot succeed without available space in the volume group.

24
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

Snapshots use copy-on-write; when full, they are dropped and become inaccessible. Original volume unaffected.

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.

25
MCQeasy

Refer to the exhibit. Which filesystem is mounted using the XFS filesystem type?

A./home
B./boot
C./proc
D./
AnswerA

XFS filesystem.

Why this answer

The correct answer is A (/home) because the exhibit shows that /home is mounted with the XFS filesystem type, as indicated in the output of the 'df -hT' or similar command. XFS is a high-performance 64-bit journaling filesystem commonly used in Linux for large files and scalability, and it is the default filesystem in RHEL/CentOS 7 and later.

Exam trap

Linux Foundation often tests the misconception that the root filesystem (/) is always XFS in modern distributions, but many exam scenarios use ext4 for / and reserve XFS for separate partitions like /home or /var.

How to eliminate wrong answers

Option B (/boot) is wrong because /boot is typically mounted using ext4 or ext3, not XFS, as it requires a simpler filesystem for bootloader compatibility. Option C (/proc) is wrong because /proc is a pseudo-filesystem (procfs) that exists only in memory and is not a physical disk filesystem like XFS. Option D (/) is wrong because the root filesystem in the exhibit is shown as ext4, not XFS, which is a common default for many distributions.

26
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

Correct: RAID 1 requires level=1.

Why this answer

Option B is correct because 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.

27
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

Common package managers for various distributions.

28
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 -sh calculates the total size of the directory.

Why this answer

Option D is correct because 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.

29
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 safely relocates data online.

Why this answer

Option D is correct because 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.

30
Multi-Selecthard

Which THREE of the following are potential causes for a system failing to boot with 'Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block'?

Select 3 answers
A.The SATA cable for the root disk is loose, causing the disk to be detected intermittently.
B.The partition table on the root disk uses GPT but the BIOS is set to legacy boot.
C.The initramfs image is missing the necessary tools to mount the root filesystem, e.g., missing filesystem driver.
D.The root filesystem is corrupted and cannot be read by the kernel.
E.The root filesystem is located on a device that requires a kernel module not included in the initramfs.
AnswersC, D, E

If initramfs lacks the driver, mount fails.

Why this answer

Options A, C, and D are correct. A missing root filesystem, unsupported filesystem, or bad initrd are common causes. Option B is wrong because SATA cable issue would prevent detection entirely, but the error mentions unknown-block (device exists but cannot mount).

Option E is wrong because GPT vs MBR affects partition table, not filesystem mount.

31
Multi-Selectmedium

Which three RAID levels are commonly supported in Linux software RAID? (Choose three.)

Select 3 answers
A.RAID 0
B.RAID 1
C.RAID 5
D.RAID 4
E.RAID 6
AnswersA, B, C

Striping without redundancy.

Why this answer

RAID 0 (striping) is supported in Linux software RAID via the md (multiple device) subsystem, providing improved performance by distributing data across multiple disks without redundancy. It is a standard RAID level implemented in the Linux kernel's md driver.

Exam trap

The trap here is that candidates often assume RAID 6 is one of the three most common levels because it is widely used, but the LFCS exam specifically tests knowledge that RAID 0, 1, and 5 are the three traditionally and most commonly supported levels in Linux software RAID, with RAID 6 being an extension rather than a core level.

32
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

Comma-separated options in one -o is correct.

Why this answer

Option D is correct because 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`.

33
MCQeasy

Refer to the exhibit. Which mount options are set for the root filesystem?

A.defaults,noatime
B.defaults
C.errors=remount-ro
D.noauto,user
AnswerA

The root filesystem has defaults and noatime options.

Why this answer

Option A is correct because the root filesystem's options field shows 'defaults,noatime'. Option B shows 'defaults' only, which is for /home. Option C shows 'noauto,user' for the CD-ROM.

Option D is not present in the fstab.

34
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 uses 256-byte inodes by default.

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.

35
MCQmedium

A system administrator wants to create a RAID 1 array using two whole disks /dev/sdb and /dev/sdc. They plan to use mdadm. Which command creates the array and builds it with two devices?

A.mdadm --create /dev/md0 --level=mirror --raid-disks=2 /dev/sdb /dev/sdc
B.mdadm --create /dev/md0 --level=raid1 --add /dev/sdb /dev/sdc
C.mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
D.mdadm --assemble /dev/md0 /dev/sdb /dev/sdc
AnswerC

Correct syntax for creating RAID1.

Why this answer

Option B is correct: mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc. Option A has wrong option name (--level=mirror, though accepted sometimes). Option C uses --add which is wrong for creation.

Option D uses --assemble which assembles an existing array.

36
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

Correct: RAID1 uses only the smallest disk's capacity for data.

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.

37
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

Directly checks and repairs ext4.

Why this answer

Options B and C are correct. fsck.ext4 and e2fsck are specific to ext4. Option A is for creating filesystem. Option D is for XFS.

Option E is for Btrfs.

38
MCQmedium

A system administrator needs to increase the size of an existing filesystem mounted at /var/www. The filesystem resides on a logical volume /dev/vg_web/lv_web. The volume group has free space. The administrator runs: lvextend -L +5G /dev/vg_web/lv_web, and then resize2fs /dev/vg_web/lv_web. The commands complete without error, but df shows the filesystem size did not change. What is the most likely reason?

A.The resize2fs command was run without the device path; it requires the mount point.
B.The volume group does not have enough free extents; the lvextend failed silently.
C.The filesystem is not ext4; it is XFS, which requires xfs_growfs.
D.The logical volume was not properly extended; need to use pvresize.
AnswerC

Correct: XFS uses xfs_growfs, not resize2fs.

Why this answer

Option B is correct because if the filesystem is XFS (common for /var/www), resize2fs will not work; xfs_growfs must be used. Option A is false; resize2fs can take the device path. Option C is unnecessary; lvextend does not require pvresize.

Option D would have produced an error if lvextend failed.

39
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

The standard procedure: fail and remove the failed disk, then add the spare, triggering a rebuild.

Why this answer

Option B is correct because the proper procedure is to first mark the failed disk as failed in the MD array, remove it, then add the new disk, which triggers a rebuild. Option A is wrong because simply adding the new disk without removing the failed one will not work; the array still has a failed disk. Option C is wrong because recreating the array destroys existing data.

Option D is wrong because LVM does not have native RAID capabilities and this would not utilize the existing RAID metadata.

40
MCQhard

Your company runs a critical database server that uses a 2TB XFS filesystem mounted at /data. The filesystem resides on an LVM logical volume (lv_data) within a volume group (vg_data) that spans four physical volumes (each 600GB SSD). You have been receiving low-space alerts: /data is at 95% capacity. After reviewing usage, you determine that the database will need an additional 500GB within the next month. The server has no additional physical disks available, but there is an unused 1TB SSD in inventory that you can install. However, the server is in production and cannot be rebooted. The system uses a 5.10 Linux kernel. Which of the following is the best approach to increase the available space for /data?

A.Create a RAID 0 array with the existing SSDs and the new SSD using mdadm, then format with XFS and mount at a different mount point, then move data.
B.Shrink other logical volumes in vg_data that are not important to free up space, then extend lv_data.
C.Install the new SSD, create a partition with fdisk, run pvcreate, vgextend vg_data, lvextend -L +500G /dev/vg_data/lv_data, and then run xfs_growfs /data.
D.Backup /data to an external drive, delete the logical volume, volume group, and physical volumes, then recreate everything including the new SSD to have a single large filesystem, then restore data.
AnswerC

Online expansion of XFS is supported; all steps are non-disruptive.

Why this answer

Option C is correct because it follows the proper procedure to add a new physical disk to an existing LVM volume group, extend the logical volume, and then grow the XFS filesystem online without unmounting or rebooting. The `xfs_growfs` command is specifically designed to expand an XFS filesystem while it is mounted, which is essential for a production database server that cannot be rebooted.

Exam trap

The trap here is that candidates may think a reboot or unmounting is required to extend an XFS filesystem on LVM, but `xfs_growfs` works online, and the correct sequence of LVM commands (pvcreate, vgextend, lvextend) followed by `xfs_growfs` is the only way to add space without downtime.

How to eliminate wrong answers

Option A is wrong because creating a RAID 0 array with mdadm would require reformatting and moving data, causing downtime, and does not integrate with the existing LVM structure. Option B is wrong because shrinking other logical volumes is risky, may not free up enough contiguous space, and is not the recommended approach when a new physical disk is available. Option D is wrong because backing up and recreating the entire LVM stack is unnecessarily disruptive, requires downtime, and is not needed when LVM supports online extension with `xfs_growfs`.

41
MCQmedium

Refer to the exhibit. A system administrator needs to mount the boot filesystem. Which partition should be used?

A./dev/sda2
B.None of the above
C./dev/sda1
D./dev/sda3
AnswerC

EFI System Partition used as /boot/efi or /boot on UEFI systems.

Why this answer

Option C is correct because /dev/sda1 is typically the first partition on a disk and is commonly used as the boot partition in MBR or GPT layouts, containing the bootloader and kernel images. The boot filesystem (often mounted at /boot) must be accessible early in the boot process, and partition 1 is the standard location for this purpose.

Exam trap

The trap here is that candidates may assume the boot partition is always /dev/sda2 (the root partition) or that 'None of the above' is a safe default, but the LFCS exam expects knowledge of standard partition numbering where /dev/sda1 is the boot partition.

How to eliminate wrong answers

Option A is wrong because /dev/sda2 is usually reserved for the root filesystem or swap, not the boot partition, and using it would conflict with standard partitioning conventions. Option B is wrong because /dev/sda1 is a valid partition that can serve as the boot filesystem, so 'None of the above' is incorrect. Option D is wrong because /dev/sda3 is typically an extended partition or a logical volume container, not the primary boot partition, and it may not be directly bootable.

42
Drag & Dropmedium

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

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order

Why this order

Cron format: minute hour day month weekday. 0 2 * * * means 2:00 AM daily.

43
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

Initializes the LUKS container.

Why this answer

Option B is correct because `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.

44
MCQeasy

A system administrator needs to partition a new 2TB disk using GPT. Which tool should be used?

A.cfdisk
B.fdisk
C.parted
D.sfdisk
AnswerC

Supports GPT and large disks.

Why this answer

Parted is the correct tool because it explicitly supports GPT partition tables on disks larger than 2TB, whereas fdisk and cfdisk traditionally use MBR (which is limited to 2TB) and sfdisk is primarily a script-based tool that, while it can handle GPT, is not the standard interactive tool for initial partitioning of a new 2TB GPT disk. Parted provides both interactive and scriptable modes and is designed to handle modern partition table formats like GPT.

Exam trap

The trap here is that candidates often assume fdisk is the universal partitioning tool because of its widespread use with MBR, but the LFCS exam specifically tests knowledge of GPT support and the fact that parted (or gdisk) is the correct choice for disks larger than 2TB with GPT.

How to eliminate wrong answers

Option A is wrong because cfdisk is a curses-based partition editor that, by default, operates on MBR partition tables and does not natively support GPT without additional flags or a separate version (like cgdisk). Option B is wrong because fdisk traditionally uses MBR and, although newer versions (util-linux 2.23+) can handle GPT, it is not the recommended or primary tool for GPT on a 2TB disk; its default behavior and legacy association with MBR make it a poor choice for this specific requirement. Option D is wrong because sfdisk is a script-oriented tool for dumping and restoring partition tables, not an interactive partitioner for initial setup; while it can handle GPT, it is not the standard interactive tool a sysadmin would use to partition a new disk.

45
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

Correct command.

Why this answer

Option C is correct because 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.

46
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 displays UUID and filesystem type.

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.

47
MCQhard

A storage administrator notices that a newly created XFS filesystem on a logical volume shows only 90% of the expected capacity. The logical volume is 100GB. What is the most likely cause?

A.The disk has bad blocks that were marked as unusable.
B.The filesystem was created with a reduced size due to mkfs.xfs default settings.
C.The volume group has insufficient physical extents.
D.The filesystem is mounted with the 'noatime' option.
AnswerB

XFS reserves space for metadata; mkfs.xfs may not use full device if size is not specified.

Why this answer

B is correct because `mkfs.xfs` by default reserves 10% of the filesystem space for metadata and performance optimization (the `-i maxpct` and internal log overhead). This is not a capacity loss but a design feature of XFS, which explains why a 100GB logical volume shows only ~90GB usable.

Exam trap

The trap here is that candidates confuse the 10% XFS reserved blocks with filesystem overhead from journaling (ext4) or assume it is a bug, when in fact it is a configurable default behavior of `mkfs.xfs`.

How to eliminate wrong answers

Option A is wrong because bad blocks are handled by the device mapper or LVM at the block level, not by the filesystem; `mkfs.xfs` does not mark bad blocks as unusable during creation. Option C is wrong because the volume group having insufficient physical extents would prevent the logical volume from being created at all, not reduce its capacity after creation. Option D is wrong because the `noatime` mount option affects access time updates and performance, not the reported filesystem capacity.

48
MCQhard

A company's backup script fails with an error indicating 'no space left on device' on an NFS mount. The administrator checks 'df -h' on the NFS client and sees the mount is at 90% usage. However, the NFS server shows the exported filesystem is only 50% full. What is the most likely cause?

A.The 'df' command is caching old data; run 'sync' and then 'df' again.
B.The mount point on the client (e.g., /mnt/nfs) is on a local filesystem that is full, preventing writes to the NFS mount.
C.The NFS server is overloaded and not responding in time.
D.The NFS export has a quota limit that is lower than the actual filesystem capacity.
AnswerB

When the mount point directory itself is on a full filesystem, writes to that mount point fail.

Why this answer

Option D is correct: The NFS client's local mount point has a separate filesystem that is full. Option A is rare; performance issues wouldn't produce that error immediately. Option B is plausible but df should update; still, local mount point issue is more direct.

Option C is possible but the error message is 'no space left on device', which is a local error.

49
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

df -hT shows mounted filesystems with type and usage.

Why this answer

Option A is correct: df -hT shows all mounted filesystems with types and human-readable sizes, including ext4. Option B shows only disk info for a specific device. Option C shows partition table.

Option D shows file system creation parameters.

50
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

Scalable, used in RHEL/CentOS.

Why this answer

XFS is a high-performance 64-bit journaling filesystem created by Silicon Graphics, now widely supported in the Linux kernel. It is a valid choice for root partitions on modern Linux systems, especially for large file and high-concurrency workloads, and is the default filesystem in Red Hat Enterprise Linux 7 and later.

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.

51
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

Standard mount command; works if filesystem is recognized.

Why this answer

Option B is correct because the standard syntax for the mount command is `mount [options] <device> <mountpoint>`, so `mount /dev/sdb1 /mnt/data` correctly specifies the device first and the target directory second. Option C is also correct because it explicitly specifies the filesystem type with `-t ext4`, which is a valid and common practice when mounting a filesystem, ensuring the kernel uses the correct driver.

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`.

52
MCQhard

You are managing a Linux server that hosts a critical application using a 500GB ext4 filesystem on an LVM logical volume. The application writes large log files that are rotated weekly. Recently, the system has been experiencing intermittent performance degradation and occasional 'Input/output error' messages when writing to the log directory. The disk (SSD) is relatively new, and SMART tests report no errors. The filesystem is not full, with 60% usage. You notice that the errors occur more frequently during peak write times. Which of the following is the most appropriate first step to diagnose and resolve the issue?

A.Add an LVM cache layer to improve write performance.
B.Unmount the filesystem and run 'e2fsck -f' to check and repair filesystem corruption.
C.Replace the SSD immediately as it is likely failing despite SMART tests.
D.Mount the filesystem with the 'noatime' option to reduce write overhead.
AnswerB

Filesystem corruption can cause I/O errors even if disk is healthy.

Why this answer

Option C is correct: Running 'e2fsck -f /dev/vg/lv' will force a filesystem check and repair any inconsistencies that could cause I/O errors. Option A is wrong because SMART is already clean. Option B is wrong because mounting with noatime might help performance but won't fix errors.

Option D is wrong because increasing LVM cache requires additional hardware and may not address filesystem corruption.

53
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

Correct: -m sets reserved blocks percentage.

Why this answer

Option A is correct because 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.

54
MCQmedium

A system administrator is tasked with setting up a new 2TB disk for a database server. The database requires high read/write performance and redundancy. The server has a hardware RAID controller, but the administrator wants to use Linux software RAID for flexibility. Which of the following RAID levels should the administrator choose to maximize performance while providing fault tolerance, assuming the disk will be part of a larger array in the future?

A.RAID 5
B.RAID 0
C.RAID 6
D.RAID 10
AnswerD

RAID 10 combines mirroring and striping for performance and redundancy.

Why this answer

RAID 10 (striping of mirrors) provides both high read/write performance and fault tolerance by combining the speed of RAID 0 striping with the redundancy of RAID 1 mirroring. Since the administrator plans to add more disks to the array in the future, RAID 10 scales well with additional pairs, maintaining performance and redundancy without the parity calculation overhead of RAID 5 or RAID 6.

Exam trap

The trap here is that candidates often choose RAID 5 or RAID 6 thinking they offer a good balance of performance and redundancy, but they overlook the significant write penalty and the fact that RAID 10 actually provides superior performance for write-intensive database workloads.

How to eliminate wrong answers

Option A is wrong because RAID 5 uses distributed parity, which incurs a write penalty (each write requires reading old data and parity, then writing new data and parity) and reduces write performance, especially with large disks like 2TB. Option B is wrong because RAID 0 offers no fault tolerance; a single disk failure destroys the entire array, which contradicts the requirement for redundancy. Option C is wrong because RAID 6 uses double parity, which further increases the write penalty (two parity calculations per write) and reduces performance compared to RAID 10, while also not scaling as efficiently when adding disks to an existing array.

55
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

Correct command.

Why this answer

Option B is correct because 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.

56
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

Disables atime updates, reducing metadata writes.

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.

57
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

Correct sequence.

Why this answer

Option C is correct because 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.

58
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

Need to run resize2fs or xfs_growfs.

Why this answer

Option A is correct because `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.

59
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

Correct: quotaon enables quota enforcement after quotacheck.

Why this answer

Option B is correct because quotacheck only creates the quota database files; quotaon must be run to activate enforcement. Option A is for viewing quotas. Options C and D set limits but without quotaon, limits are not enforced.

60
MCQhard

Refer to the exhibit. An administrator attempts to mount all filesystems using mount -a, but it fails. The error message indicates that UUID=jkl012 is not found. Which of the following is the most likely cause?

A.The swap partition is not formatted or missing.
B.The /dev/mapper/vg_data-lv_data device does not exist.
C.The NFS share is unreachable.
D.The /home filesystem type is incorrect.
AnswerA

Correct cause.

Why this answer

The error 'UUID=jkl012 not found' indicates that the system cannot locate a device with that UUID. Since the swap partition is typically referenced by UUID in /etc/fstab and is not required for normal filesystem mounting, a missing or unformatted swap partition would cause mount -a to fail when it tries to mount the swap entry. This is the most likely cause because swap is often the only filesystem that can be missing without affecting other mounts, yet mount -a processes all entries including swap.

Exam trap

Linux Foundation often tests the misconception that mount -a only mounts regular filesystems, when in fact it also processes swap entries, so candidates overlook swap as the cause of a UUID error.

How to eliminate wrong answers

Option B is wrong because if /dev/mapper/vg_data-lv_data did not exist, the error would likely reference that device path or a 'special device does not exist' message, not a UUID mismatch. Option C is wrong because an unreachable NFS share would produce a timeout or 'mount.nfs: Connection refused' error, not a UUID not found error. Option D is wrong because an incorrect filesystem type for /home would produce a 'wrong fs type, bad option, bad superblock' error, not a UUID lookup failure.

61
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

COW ensures original data is preserved until overwritten, then copied to snapshot.

Why this answer

Option C is correct because LVM snapshots use copy-on-write (COW) technology, which means that only the data blocks that are changed after the snapshot is created are copied to the snapshot volume. This makes snapshots space-efficient, as they do not duplicate the entire original volume at creation time.

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.

62
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 symbolic links; if not triggered, links may not appear immediately.

Why this answer

Option C is correct: udev rules may not have been applied yet, so symbolic links are missing. Option A is wrong because the SCSI driver is already loaded (detected). Option B is wrong because the disk is detected.

Option D is wrong because the device mapper does not affect /dev/disk/by-id/.

63
Multi-Selectmedium

Which TWO commands can be used to create a new physical volume for use with LVM? (Choose two.)

Select 2 answers
A.mkfs.ext4 /dev/sdb1
B.pvresize /dev/sdb1
C.pvcreate /dev/sdb1
D.fdisk /dev/sdb (then set type to 8e)
E.pvdisplay /dev/sdb1
AnswersC, D

pvcreate directly initializes a physical volume.

Why this answer

Option C is correct because `pvcreate /dev/sdb1` initializes a block device (or partition) as a physical volume (PV) for LVM, writing LVM metadata to the device. This is the standard command to create a new PV, making it available for inclusion in a volume group.

Exam trap

The trap here is that candidates may confuse filesystem creation (`mkfs`) with LVM physical volume creation, or mistake query commands (`pvdisplay`) or resize commands (`pvresize`) for creation commands, leading them to select incorrect options that do not actually initialize a new PV.

64
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

Provide detailed information.

Why this answer

Options D and E are correct because both `pvdisplay`, `vgdisplay`, `lvdisplay` (option D) and `pvs`, `vgs`, `lvs` (option E) are standard LVM commands that display detailed or summary information about physical volumes, volume groups, and logical volumes, respectively. Option D provides verbose output with attributes like PE size, allocation policies, and device paths, while option E offers a compact, customizable tabular view ideal for scripting or quick inspection.

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.

65
MCQmedium

A system administrator is troubleshooting a server that fails to mount an XFS filesystem on /dev/sdb1 during boot. The filesystem was recently created. Which command should the administrator run to check the filesystem for corruption?

A.fsck.ext4 /dev/sdb1
B.xfs_check /dev/sdb1
C.xfs_repair /dev/sdb1
D.xfs_admin /dev/sdb1
AnswerC

xfs_repair is the tool for checking and repairing XFS filesystems.

Why this answer

Option B is correct because xfs_repair is the appropriate tool for repairing XFS filesystems. Option A is wrong because fsck.ext4 is for ext4 filesystems, not XFS. Option C is wrong because xfs_check is deprecated and not recommended; it has been replaced by xfs_repair.

Option D is wrong because xfs_admin is used for tuning parameters, not checking for corruption.

66
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

Correct: Thin pool full leads to read-only volumes; extend pool to restore writes.

Why this answer

Option A is correct because when an LVM thin pool is full, writes to thin volumes fail, and the volumes become read-only to prevent corruption. The solution is to add more physical storage to the volume group and extend the thin pool. Option B is incorrect because corruption does not occur immediately; data is safe if volumes go read-only.

Option C describes behavior for snapshots, not primary volumes. Option D is false; thin pools do not auto-extend.

67
Multi-Selecteasy

Which TWO commands can display disk space usage of mounted filesystems? (Choose two.)

Select 2 answers
A.parted
B.du
C.fdisk
D.df
E.lsblk
AnswersB, D

du displays disk usage of files/directories.

Why this answer

Option A (df) shows filesystem space usage. Option D (du) shows directory space usage. Option B fdisk is for partition manipulation.

Option C lsblk lists block devices. Option E parted is for partition editing.

68
Multi-Selecthard

Which TWO commands should the administrator run to identify and fix the duplicate PV?

Select 2 answers
A.pvscan --cache
B.vgextend vg00 /dev/sdd1
C.vgreduce --removemissing vg00
D.vgimportclone /dev/sdc1
E.pvremove /dev/sdc1
AnswersA, C

Rebuilds LVM cache to refresh PV information and often resolves duplicate entries.

Why this answer

Options A and C are correct. Option A, pvscan --cache, rebuilds the LVM cache to update the view of available PVs and often removes duplicate entries. Option C, vgreduce --removemissing vg00, removes the missing PV from the volume group, which is appropriate after confirming the unknown PV is no longer available.

Option B is wrong because vgimportclone is used to import a cloned volume group, not for removing duplicates. Option D is wrong because pvremove is destructive and would remove the PV metadata from /dev/sdc1, which might still be valid. Option E is wrong because adding a new PV does not resolve the duplicate issue.

69
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

Correct command.

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.

70
MCQhard

After adding a new disk and creating an ext4 filesystem on /dev/sdc1 with mke2fs, the administrator added an entry to /etc/fstab to mount it at /data. However, after reboot, the filesystem is not mounted. Which of the following is the most likely cause?

A.The filesystem superblock was corrupted.
B.The filesystem was not formatted correctly.
C.The fstab entry uses the device name /dev/sdc1 instead of UUID.
D.The mount point /data does not exist.
AnswerC

Device names can change after reboot; using UUID in fstab prevents this issue.

Why this answer

Option C is correct because when using device names like /dev/sdc1 in /etc/fstab, the kernel may assign a different device name (e.g., /dev/sdb1) after reboot due to asynchronous device discovery, causing the mount to fail. Using the filesystem's UUID (universally unique identifier) ensures persistent identification regardless of device name changes, which is a best practice for ext4 filesystems created with mke2fs.

Exam trap

The trap here is that candidates assume device names like /dev/sdc1 are stable across reboots, but LFCS exams test the understanding that UUIDs or LABELs are required for persistent mounts, especially after adding new disks.

How to eliminate wrong answers

Option A is wrong because superblock corruption would typically cause mount failures with specific I/O errors, not a silent failure to mount after reboot; the administrator would likely see errors during mount or fsck. Option B is wrong because mke2fs is the standard tool for creating ext4 filesystems, and if it completed without errors, the filesystem is correctly formatted; a formatting issue would produce immediate errors during creation or mounting. Option D is wrong because if /data did not exist, the mount command would fail with a 'No such file or directory' error, and the administrator would have noticed this during initial testing or system logs; the question implies the mount point was created.

71
MCQmedium

A sysadmin is troubleshooting an issue where a software RAID1 array fails to assemble after a reboot. The array was created with mdadm using /dev/sdb1 and /dev/sdc1. The administrator checks /proc/mdstat but the array is not present. They attempt to assemble manually with mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1, but it requires a repair. After repair, the array works. To prevent this from happening again, what should the administrator do?

A.Use UUIDs instead of device names in configuration.
B.Set the partition type to 'Linux RAID' on both partitions.
C.Rebuild the initramfs.
D.Add an entry for the array in /etc/mdadm/mdadm.conf.
AnswerD

Correct: This configuration file ensures automatic assembly at boot.

Why this answer

Option B is correct because adding an entry to /etc/mdadm/mdadm.conf (or /etc/mdadm.conf) with the array details allows the system to automatically assemble the array at boot. Option A is good practice but not mandatory for assembly. Options C and D are also good but B directly solves the missing auto-assembly.

72
Multi-Selecthard

An administrator is troubleshooting a server that cannot mount an XFS filesystem on /dev/sdb1. The command mount /dev/sdb1 /data fails with 'wrong fs type, bad option, bad superblock'. Which three commands can help diagnose the issue? (Choose three.)

Select 3 answers
A.dmesg | tail
B.xfs_repair -n /dev/sdb1
C.fsck /dev/sdb1
D.xfs_db -c 'sb' -c 'p' /dev/sdb1
E.blkid /dev/sdb1
AnswersA, B, D

Shows recent kernel logs.

Why this answer

Option A is correct because `dmesg | tail` displays the kernel ring buffer messages, which often contain detailed error information from the XFS driver when a mount fails. This can reveal specific reasons such as a corrupt superblock, wrong filesystem type detection, or missing kernel support, helping to pinpoint the root cause.

Exam trap

The trap here is that candidates often assume `fsck` is a universal filesystem checker, but it is specific to ext family filesystems and should never be used on XFS, where `xfs_repair` is the correct tool.

73
Multi-Selecteasy

Which two commands can be used to create an ext4 filesystem on a Linux block device? (Choose two.)

Select 2 answers
A.fsck.ext4 /dev/sdb1
B.mke2fs -j /dev/sdb1
C.mke2fs -t ext4 /dev/sdb1
D.tune2fs -O extents /dev/sdb1
E.mkfs.ext4 /dev/sdb1
AnswersC, E

Creates ext4 using the -t ext4 option.

Why this answer

Both `mke2fs -t ext4` and `mkfs.ext4` are valid commands to create an ext4 filesystem. `mke2fs` is the underlying tool for creating ext2/ext3/ext4 filesystems, and the `-t ext4` flag explicitly sets the filesystem type to ext4. `mkfs.ext4` is a wrapper script that calls `mke2fs` with the appropriate options for ext4, making it a direct and commonly used alternative.

Exam trap

The trap here is that candidates may confuse `mke2fs -j` (which creates ext3) with a command that creates ext4, or think `tune2fs` can create a filesystem, when it only modifies existing ones.

74
MCQmedium

An administrator wants to ensure that a specific LVM logical volume is automatically resized when the underlying physical volume is extended. Which steps are required?

A.Add the logical volume to the volume group with '--auto-resize' flag.
B.Extend the physical volume, extend the logical volume, and update /etc/fstab with 'auto-resize' option.
C.Mount the filesystem with the 'extend' option to allow automatic resize on PV changes.
D.Extend the physical volume, extend the logical volume, and then run resize2fs (or xfs_growfs) to resize the filesystem.
AnswerD

Filesystem resize is a manual step after LV extension.

Why this answer

Option B is correct: After extending the PV and LV, the filesystem must be resized with resize2fs or xfs_growfs. Option A forgets to resize the filesystem. Option C is wrong because auto-resize is not a mount option.

Option D is wrong because LVM does not auto-resize.

75
MCQmedium

A database server is running out of space in its /var/lib/mysql directory. The system admin wants to add a new 100GB disk to increase storage. Which of the following steps should be performed to mount the new filesystem at /var/lib/mysql without data loss?

A.Add the new disk as an LVM physical volume, extend the volume group, extend the logical volume containing /var/lib/mysql, and then resize the filesystem.
B.Partition the disk, create a filesystem, add an entry in /etc/fstab, and reboot the server.
C.Partition the disk, create a filesystem, mount it directly to /var/lib/mysql, and then move the existing data into place.
D.Partition the disk, create a filesystem, mount it at a temporary mount point, copy existing data from /var/lib/mysql to the new filesystem, unmount /var/lib/mysql (if it's a mount), mount the new filesystem at /var/lib/mysql, and update /etc/fstab.
AnswerD

Correct procedure ensures no data loss.

Why this answer

Option D is correct because it ensures no data loss by first copying existing data to the new filesystem mounted at a temporary point, then unmounting the old mount (if any) and remounting the new filesystem at /var/lib/mysql. This preserves the existing database files and allows the new disk to be used without disrupting the directory structure. The /etc/fstab update ensures the mount persists across reboots.

Exam trap

The trap here is that candidates often choose Option C, thinking they can mount directly and then move data, but they overlook that mounting over a non-empty directory hides existing data, making it impossible to move without unmounting first, which would cause data loss if not done carefully.

How to eliminate wrong answers

Option A is wrong because it assumes /var/lib/mysql is already on an LVM logical volume, but the question does not state that; if it is not, extending LVM would not apply, and even if it were, the steps described (extend LV, resize filesystem) would not involve adding a new disk to the mount point without data migration steps. Option B is wrong because partitioning, creating a filesystem, adding an fstab entry, and rebooting would mount the new disk at /var/lib/mysql only if the directory is empty or the old data is overwritten; it does not include copying existing data, leading to data loss. Option C is wrong because mounting the new filesystem directly to /var/lib/mysql would obscure any existing data in that directory (the old data would become inaccessible until unmounted), and moving data into place after mounting would require unmounting and remounting, risking data loss or corruption.

Page 1 of 2 · 78 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Storage Management questions.