> ## Documentation Index
> Fetch the complete documentation index at: https://linux-plus.ipoint-labs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Domain 7 Review Quiz

> 10 practice questions for Domain 7. Administering Storage.

10 practice questions covering **Administering Storage**. Read the question, take answers from the room, then reveal.

<div className="quiz" data-total="10">
  <div className="quiz__q" data-n="1" data-answer="D">
    <p className="quiz__stem">
      { "An administrator receives the following output while attempting to unmount a filesystem: umount /data1: target is busy. Which of the following commands should the administrator run next to determine why the filesystem is busy?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "ps -f /data1" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "du -sh /data1" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "top -d /data1" }</span></li>
      <li className="quiz__choice" data-letter="D" data-correct="1"><span className="quiz__letter">D</span><span className="quiz__text">{ "lsof | grep /data1" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: D</p>

      <p className="quiz__why">
        { "The lsof command lists open files and the processes using them. Running lsof | grep /data1 will show which processes are keeping the /data1 filesystem busy, preventing it from being unmounted." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="2" data-answer="A">
    <p className="quiz__stem">
      { "An administrator completes maintenance on a server but cannot remount the logical volume. Given the following output: Which of the following commands should the administrator execute to resolve the issue?" }
    </p>

    <pre className="quiz__exhibit">
      <code>
        { "# mount /dev/data/files /mnt/files\nmount: special device /dev/data/files does not exist\n# lvs\n  LV     VG    Attr       LSize\n  files  data  -wi-------  50.00g\n# vgs\n  VG    #PV #LV #SN Attr   VSize   VFree\n  data    1   1   0 wz--n- 100.00g  50.00g" }
      </code>
    </pre>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A" data-correct="1"><span className="quiz__letter">A</span><span className="quiz__text">{ "vgchange -ay data" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "lvscan --all" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "vgimport data" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "lvchange -ay /dev/data/files" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: A</p>

      <p className="quiz__why">
        { "The error message \"special device /dev/data/files does not exist\" suggests that the volume group data is not activated. From the lvs and vgs output: - The logical volume files exists within the data volume group. - The volume group (VG) and logical volume (LV) appear correctly listed, but they might be in an inactive state due to maintenance." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="3" data-answer="CD">
    <p className="quiz__stem">
      { "Users connecting to a MySQL database on a Linux system report frequent errors. An administrator reviews the following partial output of the /proc/meminfo and free commands: Which of the following should the administrator do to ensure that the MySQL service will continue to run even if the system runs out of swap space? (Choose two.)" }
    </p>

    <pre className="quiz__exhibit">
      <code>
        { "# grep -E \"MemTotal|MemFree|SwapTotal|SwapFree\" /proc/meminfo\nMemTotal:        8127424 kB\nMemFree:          201536 kB\nSwapTotal:       2097148 kB\nSwapFree:          18432 kB\n\n# free -m\n               total        used        free      shared  buff/cache   available\nMem:            7937        7521         196          12         220         184\nSwap:           2047        2029          18" }
      </code>
    </pre>

    <p className="quiz__hint">Choose two.</p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "Issue the sysctl -w vm.overcommit_ratio=100 command." }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "Issue the sysctl -w vm.overconunit_memory=2 command.(Invalid key)" }</span></li>
      <li className="quiz__choice" data-letter="C" data-correct="1"><span className="quiz__letter">C</span><span className="quiz__text">{ "Issue the dd if=/dev/zero of=/swapfile bs=1024 count=65536 command." }</span></li>
      <li className="quiz__choice" data-letter="D" data-correct="1"><span className="quiz__letter">D</span><span className="quiz__text">{ "Issue the mkswap /dev/sda2; swapon -v /dev/sda2 command." }</span></li>
      <li className="quiz__choice" data-letter="E"><span className="quiz__letter">E</span><span className="quiz__text">{ "Reload the /etc/fstab file by issuing the mount -a command.(Not sufficient alone)" }</span></li>
      <li className="quiz__choice" data-letter="F"><span className="quiz__letter">F</span><span className="quiz__text">{ "Use disk quotas on the swap space to prevent MySQL from overutilizing the swap partition." }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: CD</p>

      <p className="quiz__why">
        { "Creating a swap file with dd if=/dev/zero of=/swapfile bs=1024 count=65536 allocates additional swap space that MySQL can use when RAM is exhausted. Formatting and enabling a swap partition with mkswap /dev/sda2; swapon -v /dev/sda2 brings another swap device online, further increasing the system’s swap capacity." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="4" data-answer="D">
    <p className="quiz__stem">
      { "A Linux administrator attempts to unmount the local filesystem /data in order to mount a new volume. However, the administrator receives the following error message: umount: /data: target is busy Which of the following commands should the administrator run to resolve the issue?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "tree -g /data" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "ls -ld /data" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "stat -f /data" }</span></li>
      <li className="quiz__choice" data-letter="D" data-correct="1"><span className="quiz__letter">D</span><span className="quiz__text">{ "fuser -mk /data" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: D</p>

      <p className="quiz__why">
        { "The fuser command identifies and terminates processes that are actively using the /data filesystem, allowing it to be safely unmounted once those processes are stopped." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="5" data-answer="D">
    <p className="quiz__stem">
      { "A Linux administrator is concerned about corruption of the partition table and wants to make a backup. Which of the following should the administrator use?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "cpio" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "gzip" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "tar" }</span></li>
      <li className="quiz__choice" data-letter="D" data-correct="1"><span className="quiz__letter">D</span><span className="quiz__text">{ "dd" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: D</p>

      <p className="quiz__why">
        { "The dd command can create a sector-by-sector copy of a disk, including the partition table, making it suitable for backing up low-level disk structures." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="6" data-answer="A">
    <p className="quiz__stem">
      { "A systems administrator needs to integrate a new storage array into the company's existing storage pool. The administrator wants to ensure that the server is able to detect the new storage array. Which of the following commands should the administrator use to ensure that the new storage array is presented to the systems?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A" data-correct="1"><span className="quiz__letter">A</span><span className="quiz__text">{ "lsscsi" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "lsusb" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "lsipc" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "lshw" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: A</p>

      <p className="quiz__why">
        { "The lsscsi command is used to list information about SCSI devices (including storage arrays) that are attached to the system. This is critical when integrating a new storage array because it allows the administrator to verify that the operating system detects the new device at the SCSI layer, which is the underlying interface for most enterprise storage solutions. lsscsi outputs a list of recognized SCSI devices, their device nodes, and associated information." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="7" data-answer="C">
    <p className="quiz__stem">
      { "An administrator added a new disk to expand the current storage. Which of the following commands should the administrator run first to add the new disk to the LVM?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "vgextend" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "lvextend" }</span></li>
      <li className="quiz__choice" data-letter="C" data-correct="1"><span className="quiz__letter">C</span><span className="quiz__text">{ "pvcreate" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "pvresize" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: C</p>

      <p className="quiz__why">
        { "To add a new physical disk to LVM, the disk must first be initialized as a physical volume using the pvcreate command. This prepares the new disk for use by the LVM subsystem. After initializing with pvcreate, you would use vgextend to add the new physical volume to an existing volume group." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="8" data-answer="A">
    <p className="quiz__stem">
      { "Which of the following commands is used to display detailed information about block devices on a Linux system?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A" data-correct="1"><span className="quiz__letter">A</span><span className="quiz__text">{ "lsblk" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "mount" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "df" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "fdisk" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: A</p>

      <p className="quiz__why">
        { "The correct answer is A. lsblk because it is specifically designed to display detailed information about block devices such as hard drives, SSDs, partitions, and their mount points in a structured, hierarchical format. The lsblk (list block devices) command provides a clear overview of how storage devices are organized, including relationships between disks and their partitions. When executed, lsblk shows important details such as device names (e.g., sda, sdb), sizes, types (disk or partition), and mount points. This makes it extremely useful for system administrators when managing storage, troubleshooting disk issues, or verifying newly attached devices." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="9" data-answer="A">
    <p className="quiz__stem">
      { "An administrator needs to create a new logical volume from sets of provisioned disks. Which of the following shows the correct order of commands the administrator should execute?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A" data-correct="1"><span className="quiz__letter">A</span><span className="quiz__text">{ "1. pvcreate, 2. vgcreate, 3. lvcreate" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "1. vgcreate, 2. pvcreate, 3. lvcreate" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "1. vgcreate, 2. lvcreate, 3. pvcreate" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "1. lvcreate, 2. pvcreate, 3. vgcreate" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: A</p>

      <p className="quiz__why">
        { "Logical Volume Management (LVM) is a fundamental storage management concept in CompTIA Linux+ V8. LVM provides a layered abstraction between physical storage devices and the filesystems used by the operating system. To successfully provision a new logical volume, an administrator must follow a strict hierarchy of operations: pvcreate (Physical Volume): This is the first step. The administrator must initialize the raw physical disks or partitions for use by LVM. This command writes LVM metadata to the disk, making it a \"Physical Volume\" (PV). vgcreate (Volume Group): In the second step, the administrator combines one or more Physical Volumes into a single storage pool called a \"Volume Group\" (VG). The VG acts like a virtual disk drive created from the combined capacity of the underlying PVs. lvcreate (Logical Volume): Finally, the administrator carves out space from the Volume Group to create \"Logical Volumes\" (LV). These LVs act like partitions and are where the administrator will actually create a filesystem (e.g., mkfs.ext4) and mount it for use. This order is mandatory because each layer depends on the existence of the one below it. You cannot create a VG without PVs, and you cannot create an LV without a VG. Therefore, the sequence pvcreate -\u003e vgcreate -\u003e lvcreate is the verified and only correct order of execution." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="10" data-answer="C">
    <p className="quiz__stem">
      { "A Linux server is experiencing slowness. A systems administrator obtains the following output: top - load average: 2.43, 1.80, 2.32 Tasks: ... 154 zombie %Cpu(s): 6.2 us, 5.1 sy, 0.0 ni, 79.2 id, 9.1 wa, ... $ iostat -m 2 %user %nice %system %iowait %steal %idle 4.30 2.02 0.29 70.38 4.00 19.01 Which of the following explains the issue?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "The system ran out of swap space." }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "The CPU is overutilized." }</span></li>
      <li className="quiz__choice" data-letter="C" data-correct="1"><span className="quiz__letter">C</span><span className="quiz__text">{ "The storage I/O latency is high." }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "The system needs to be patched." }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: C</p>

      <p className="quiz__why">
        { "Performance troubleshooting in CompTIA Linux+ V8 requires the ability to correlate metrics from tools like top, vmstat, and iostat. In this case, the iostat output provides the most critical data point: %iowait is at 70.38%. The %iowait metric (also shown as wa in top) represents the percentage of time that the CPU was idle while there were outstanding disk I/O requests. Essentially, the CPU is waiting for the storage subsystem (hard drives or SSDs) to complete read or write operations. A value as high as 70% indicates a severe bottleneck in the storage layer. This \"I/O wait\" causes the system to feel sluggish or unresponsive because processes are stuck in an uninterruptible sleep state while waiting for data from the disk." }
      </p>
    </div>
  </div>
</div>
