1Z0-106 practice question 2 of 15

Which two statements are true about removing a physical volume (PV) from a volume group (VG)?

Full set: 60 questions
Answer options
A: It can be removed only after removing it from its VG by using vgreduce. Correct answer
B: It can be removed when an active VG has mounted file systems by running vgexport.
C: It cannot be removed when it is part of an active VG.
D: It can be removed when an inactive logical volume is on the VG.
E: It can be removed when it is part of an active VG. Correct answer
Correct Answer:
A. It can be removed only after removing it from its VG by using vgreduce.; E. It can be removed when it is part of an active VG.
Explanation

The standard procedure for removing a physical volume (PV) from a volume group (VG) requires two key considerations. First, the VG's metadata must be updated to reflect the removal of the PV. This is accomplished using the vgreduce command, making it a mandatory step before the PV is considered fully removed from the LVM configuration (A). Second, a primary feature of LVM is its support for online administration. It is possible to migrate all data extents off a specific PV using pvmove and then use vgreduce to remove it from the VG, all while the VG and its logical volumes remain active and mounted. This capability is crucial for maintenance tasks like replacing disks without downtime (E).

Why Incorrect

B. The vgexport command is used to prepare an inactive VG for removal or migration to another system; it cannot be run on an active VG with mounted file systems.
C. This is incorrect. LVM is designed to allow for the online removal of a PV from an active VG, typically by first migrating its data with pvmove.
D. The ability to remove a PV depends on whether it contains any allocated extents, not on the active/inactive status of logical volumes that may reside on other PVs.

References

1. Oracle® Linux 7: Administrator's Guide, Section 10.3.5. "Removing Physical Volumes from a Volume Group". The documentation outlines the procedure using pvmove followed by vgreduce, and the examples do not require deactivating the volume group, confirming that the operation can be done on an active VG.

2. Red Hat Enterprise Linux 8: Configuring and managing logical volumes, Section 4.4.8. "Removing physical volumes from a volume group". This official documentation states, "If there are logical volumes on the physical volume, you must move the data from the physical volume before you can remove it. You can use the pvmove command to move the data from the physical volume while your system is running." This explicitly confirms that a PV can be removed from an active VG.

3. LVM HOWTO, Section 5.6. "Removing disks from a volume group". This foundational guide details the process: "1. Use pvmove to move the allocated extents off the PV(s). 2. Use vgreduce to remove the PV(s) from the VG. 3. Use pvremove to remove the LVM metadata from the PV(s)." The context of pvmove is for online data migration, reinforcing that the VG can be active.

Scroll to Top