CompTIA XK0-006 (CompTIA Linux+) Practice Test 5

Question 40

A rack server's out-of-band controller needs a power-status query. Which utility interacts with IPMI-compatible management interfaces?

  1. lsusb
  2. dmidecode
  3. ipmitool chassis power status
  4. nvtop

Explanation

Correct Answer

C:

ipmitool can query or control supported baseboard management controllers through IPMI. This is hardware management, not ordinary systemd service control.

Incorrect Answers

A:

lsusb reads USB device information including bus and device identifiers; its scope differs from checking BMC chassis power status, so it cannot meet the stated requirement.

B:

dmidecode decodes DMI/SMBIOS tables to report firmware, board and system inventory; that is not equivalent to checking BMC chassis power status.

D:

nvtop provides a top-like interactive view of GPU processes and utilization on supported drivers; it answers a neighboring question rather than checking BMC chassis power status.

Question 41

A system's memory map has several offline ranges. Which command summarizes physical memory block status?

  1. lshw -short
  2. lspci -nn
  3. lsmem
  4. nvtop

Explanation

Correct Answer

C:

lsmem displays memory ranges and their online or offline state using kernel interfaces. It does not show process memory usage.

Incorrect Answers

A:

lshw collects a hardware inventory and can present it in a compact table; this does not achieve checking memory block online status on the system described.

B:

lspci enumerates PCI devices and the -nn option includes numeric vendor and device IDs; it will not provide checking memory block online status under these conditions.

D:

nvtop provides a top-like interactive view of GPU processes and utilization on supported drivers; the requirement is checking memory block online status, outside the effect of this choice.

Question 42

A block device requires a fresh ext4 filesystem after data on it is backed up. Which command creates one?

  1. tmpfs
  2. xfs_growfs /srv
  3. mkfs.ext4 /dev/vgdata/new
  4. du -sh /srv/*

Explanation

Correct Answer

C:

mkfs.ext4 constructs ext4 filesystem metadata on the chosen device. Creating a filesystem destroys the previous filesystem's logical contents.

Incorrect Answers

A:

tmpfs stores transient files in virtual memory and is commonly used for runtime directories; the evidence calls for formatting a device as ext4, not merely this separate operation.

B:

xfs_growfs enlarges an XFS filesystem while it is mounted, using the mounted filesystem path; the task involves formatting a device as ext4, whereas this addresses another subsystem.

D:

du summarizes allocated disk space for selected files and directory trees without making changes to disk structures; that is not equivalent to formatting a device as ext4.

Question 43

A storage engineer wants to know how much free space a volume group has, in a compact list. Which command is appropriate?

  1. pvs
  2. vgs
  3. lvdisplay /dev/vgdata/app
  4. vgreduce vgdata /dev/sdb

Explanation

Correct Answer

B:

vgs lists volume groups with their total and free capacities, physical-volume counts and logical-volume counts. The report comes from LVM metadata and does not modify allocations.

Incorrect Answers

A:

pvs summarizes physical volumes and their associated volume groups and free extents; it answers a neighboring question rather than inspecting group-level free capacity.

C:

lvdisplay reports detailed attributes such as device path, size, and status; this does not achieve inspecting group-level free capacity on the system described.

D:

vgreduce removes an unused physical volume from a volume group after its extents have been relocated; it will not provide inspecting group-level free capacity under these conditions.

Question 44

A maintainer wants a compact listing of logical-volume names, sizes and their group membership. Which command fits?

  1. lvs
  2. lvcreate -L 8G -n app vgdata
  3. pvresize /dev/sdb1
  4. lvextend -L 12G /dev/vgdata/app
  5. pvmove /dev/sdb

Explanation

Correct Answer

A:

lvs reports logical volumes in a concise tabular representation. It reads metadata without modifying allocations or filesystem contents.

Incorrect Answers

B:

lvcreate allocates extents from a volume group to construct a new logical volume; it does not deliver listing logical volume metadata, which is decisive in this scenario.

C:

pvresize updates LVM's known physical-volume size to reflect a larger underlying device; the evidence calls for listing logical volume metadata, not merely this separate operation.

D:

lvextend enlarges the logical volume's block-device extent allocation; the task involves listing logical volume metadata, whereas this addresses another subsystem.

E:

pvmove migrates allocated LVM extents off a selected physical volume when the group has sufficient alternative capacity; its scope differs from listing logical volume metadata, so it cannot meet the stated requirement.

Question 45

A PV backing disk has been expanded in the hypervisor, but LVM still shows the old PV size. What should run after partition resizing if applicable?

  1. pvresize /dev/sdb1
  2. lvs
  3. vgs
  4. pvmove /dev/sdb

Explanation

Correct Answer

A:

pvresize updates LVM's known physical-volume size to reflect a larger underlying device. A logical volume and its filesystem need separate growth steps.

Incorrect Answers

B:

lvs reports logical volumes in a concise tabular representation; the administrator instead needs making LVM recognize increased underlying PV capacity; this option serves a different purpose.

C:

vgs lists volume groups with their total and free capacities, physical-volume counts and logical-volume counts; it answers a neighboring question rather than making LVM recognize increased underlying PV capacity.

D:

pvmove migrates allocated LVM extents off a selected physical volume when the group has sufficient alternative capacity; that changes a different part of the system; the requested outcome is making LVM recognize increased underlying PV capacity.

Question 46

An application needs a new 8 GiB block volume inside vgdata. Which command allocates it?

  1. lvextend -L 12G /dev/vgdata/app
  2. pvmove /dev/sdb
  3. lvcreate -L 8G -n app vgdata
  4. vgs

Explanation

Correct Answer

C:

lvcreate allocates extents from a volume group to construct a new logical volume. A filesystem is normally created separately before mounting it.

Incorrect Answers

A:

lvextend enlarges the logical volume's block-device extent allocation; it will not provide allocating a named logical volume of a specified size under these conditions.

B:

pvmove migrates allocated LVM extents off a selected physical volume when the group has sufficient alternative capacity; using it would leave allocating a named logical volume of a specified size unresolved.

D:

vgs lists volume groups with their total and free capacities, physical-volume counts and logical-volume counts; it does not deliver allocating a named logical volume of a specified size, which is decisive in this scenario.

Question 47

A writable share should ignore setuid and setgid privilege elevation from its files. Which option is relevant?

  1. nosuid
  2. autofs automount map
  3. nodev
  4. noexec

Explanation

Correct Answer

A:

nosuid makes set-user-ID and set-group-ID semantics ineffective for files on that mount. It helps reduce escalation risk from untrusted storage.

Incorrect Answers

B:

autofs uses automount maps to mount supported resources when needed, often releasing idle mounts later; its scope differs from disabling setuid effects on a mount, so it cannot meet the stated requirement.

C:

nodev prevents interpretation of device special files on that filesystem as actual devices; that is not equivalent to disabling setuid effects on a mount.

D:

noexec prevents direct program execution from the mounted filesystem in normal enforcement; the administrator instead needs disabling setuid effects on a mount; this option serves a different purpose.

Question 48

The team needs to inspect which physical volumes contribute capacity to a volume group. Which command lists PVs and free space?

  1. vgreduce vgdata /dev/sdb
  2. vgextend vgdata /dev/sdd
  3. pvs
  4. lvchange -an /dev/vgdata/app

Explanation

Correct Answer

C:

pvs summarizes physical volumes and their associated volume groups and free extents. It is an inventory command rather than a migration operation.

Incorrect Answers

A:

vgreduce removes an unused physical volume from a volume group after its extents have been relocated; that changes a different part of the system; the requested outcome is viewing physical-volume allocation.

B:

vgextend adds the prepared physical volume to an existing group without replacing the group; this does not achieve viewing physical-volume allocation on the system described.

D:

lvchange can change a logical volume's activation state; using it would leave viewing physical-volume allocation unresolved.

Question 49

A logical volume must grow from 8 GiB to 12 GiB while space exists in its volume group. Which command changes the LV size?

  1. vgcreate vgdata /dev/sdb /dev/sdc
  2. pvresize /dev/sdb1
  3. vgs
  4. lvextend -L 12G /dev/vgdata/app

Explanation

Correct Answer

D:

lvextend enlarges the logical volume's block-device extent allocation. The filesystem must also be grown unless an appropriate resize option is used.

Incorrect Answers

A:

vgcreate assembles physical volumes into a volume group and establishes allocation extents; it does not deliver increasing allocated logical-volume size, which is decisive in this scenario.

B:

pvresize updates LVM's known physical-volume size to reflect a larger underlying device; the evidence calls for increasing allocated logical-volume size, not merely this separate operation.

C:

vgs lists volume groups with their total and free capacities, physical-volume counts and logical-volume counts; the task involves increasing allocated logical-volume size, whereas this addresses another subsystem.

Question 50

A volume group already exists and a new prepared disk must increase its capacity. Which operation is correct?

  1. lvdisplay /dev/vgdata/app
  2. pvs
  3. vgextend vgdata /dev/sdd
  4. vgexport vgdata
  5. pvcreate /dev/sdb

Explanation

Correct Answer

C:

vgextend adds the prepared physical volume to an existing group without replacing the group. Free extents become available for logical-volume growth.

Incorrect Answers

A:

lvdisplay reports detailed attributes such as device path, size, and status; the administrator instead needs expanding an existing volume group's backing capacity; this option serves a different purpose.

B:

pvs summarizes physical volumes and their associated volume groups and free extents; it answers a neighboring question rather than expanding an existing volume group's backing capacity.

D:

vgexport marks a volume group as exported for safe movement to a different system after suitable deactivation; this does not achieve expanding an existing volume group's backing capacity on the system described.

E:

pvcreate writes LVM physical-volume metadata to the designated device; it will not provide expanding an existing volume group's backing capacity under these conditions.

CompTIA Linux+ (XK0-006) Practice Tests