I've been going through the process of reducing the size of a Centos 6.10 image by reducing an lvmgroup. I'm at the point where I've been able to run this command:
pvresize -tv --setphysicalvolumesize 1600G /dev/md125p2
And it's giving me the following error message:
/dev/md125p2: cannot resize to 409599 extents as later ones are allocated.
I'm trying to understand how to construct the pvmove command to get rid of the error, but I don't quite get the concept.
Here is the output of this command pvs -v --segments /dev/md125p
PV VG Fmt Attr PSize PFree Start SSize LV Start Type PE Ranges
/dev/md125p2 vg_centos6svr lvm2 a--u 1.86t 320.11g 0 384000 lv_mysql 0 linear /dev/md125p2:0-383999
/dev/md125p2 vg_centos6svr lvm2 a--u 1.86t 320.11g 384000 81947 0 free
/dev/md125p2 vg_centos6svr lvm2 a--u 1.86t 320.11g 465947 12800 lv_root 0 linear /dev/md125p2:465947-478746
/dev/md125p2 vg_centos6svr lvm2 a--u 1.86t 320.11g 478747 1998 lv_swap 0 linear /dev/md125p2:478747-480744
/dev/md125p2 vg_centos6svr lvm2 a--u 1.86t 320.11g 480745 7500 lv_home 0 linear /dev/md125p2:480745-488244
I know the move command has to look something like this:
pvmove --alloc anywhere /dev/md125p2 vg_centos6svr:yyyy-end
I'm just not clear how to calculate the yyyy-end part. I figure it means move that 81947 (blocks?) that start at 384000, but what is "yyyy" and "end"?