After replacing a failing 2-TB disk that is one of the physical volumes in the volume group vgdata, you have already:
created a new physical volume on /dev/sdc with pvcreate, and
added it to the group with vgextend vgdata /dev/sdc.
All logical volumes in vgdata must stay online while every extent still located on /dev/sdb is relocated to /dev/sdc so that the old drive can later be removed.
Which single command will perform this data migration with no application downtime?
pvmove copies all allocated physical extents from a source physical volume to free extents on a destination physical volume. During the operation LVM creates a temporary mirror, allowing the move to occur while the logical volumes remain active and fully accessible.
vgreduce --removemissing only removes PVs that are already missing; it does not copy data and may delete logical volumes that still reference the lost device.
lvconvert --repair rebuilds a faulty mirror or RAID logical volume but does not move data between physical volumes.
dd if=/dev/sdb of=/dev/sdc ... clones the raw blocks but does not update LVM metadata, so logical volumes would continue to point to extents on /dev/sdb.
Therefore, pvmove /dev/sdb /dev/sdc is the correct choice.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
How does the `pvmove` command ensure no downtime during data migration?
Open an interactive chat with Bash
Why can't `dd if=/dev/sdb of=/dev/sdc` be used for moving data in LVM?
Open an interactive chat with Bash
What is the role of LVM metadata in managing physical and logical volumes?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access