I was reading about pvmove's ability to move extends from one PV to another (which would be useful, if for an example, a disk drive was starting to show signs of failures). man pages explain you can either move all of the extends on a particular PV or only a specific LV's extends:
Code:
pvmove /dev/sda5 /dev/sdb5
or
Code:
pvmove -n LogVol1 /dev/sda5 /dev/sdb5
Now, playing around in a pretend scenario where I'd only want to move a few select LVs for one reason or another (i.e: the only available PV doesn't have enough space to take all LVs from the failing PV and I'd like to move the most important LVs first) I tried finding out which PV a specific LV is on:
I tried all display and scan commands, each of them with -v, i.e.: lvdisplay, vgdisplay, pvdisplay, lvscan, vgscan and pvscan but nothing seems to specify which PV a specific lv is using.
Which brings two questions:
1. If a VG has multiple PVs assigned to it, how is it decided which PV is used when an LV is created?
2. How do I determine the PV being used for a specific LV? Of course, this question assumes there are multiple PVs assigned to the VG
TIA