You need to shrink the LVM physical volume on /dev/sdb2 from 800 GiB down to 600 GiB so you can create another partition. The volume group vgdata still has plenty of free space, but the command below fails:
# pvresize --setphysicalvolumesize 600G /dev/sdb2
/dev/sdb2: cannot resize to 153600 extents as 160000 are allocated.
Which action must you take before pvresize will allow the reduction to 600 GiB?
Deactivate vgdata with vgchange -an and rerun pvresize using the --force option.
Shrink each logical volume in vgdata with lvreduce -r until their total size is below 600 GiB.
Run vgextend vgdata /dev/sdb2 to refresh volume-group metadata, then repeat pvresize.
Move the extents that reside past the 600 GiB point with pvmove, then rerun pvresize.
pvresize refuses to shrink a physical volume when any allocated extents lie beyond the requested end of the device. Those extents must be moved elsewhere or freed first. The standard way to accomplish this is to run pvmove, which relocates the extents on the tail of /dev/sdb2 to free space in the same volume group (or to another PV). Once no extents reside past the 600 GiB boundary, pvresize will complete successfully. Simply deactivating the VG, re-extending it, or indiscriminately shrinking logical volumes does not guarantee that the offending extents are cleared, so the error would persist.
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.
What is a physical volume (PV) in LVM?
Open an interactive chat with Bash
What does the pvmove command do in LVM?
Open an interactive chat with Bash
What role do physical extents (PE) play in pvresize?
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