System Management

A technician has already migrated all data off /dev/sdb1, a partition that belonged to the volume group vg_data, and wants to repurpose the disk. Running pvremove /dev/sdb1 fails with a message that the physical volume is still used by volume group vg_data. Which action should the technician take next?

Show the answer

Correct answerB. Run vgreduce vg_data /dev/sdb1 to remove it from the group, then rerun pvremove /dev/sdb1

pvremove only wipes the LVM label from a PV that is not in a volume group, so vgreduce must detach it from vg_data first. Refreshing with pvscan --cache only updates the cache and does not change group membership, so the error persists.