I need to be able to deactivate an LV but cannot after partprobing it and finding gaining access to its partitions in /dev/mapper. It seems I need some way of 'un-partprobing' the disk, but I have no idea how and would welcome some advice.
Here's what's happening, in case I'm missing something else:
lvchange -a y /dev/vg/mylv
activates the lv fine
partprobe /dev/vg/mylv
results in lv partition being found and device creation at /dev/mapper/vg-mylvp1
lvchange -a n /dev/vg/mylv
now fails - LV vg/mylv in use: not deactivating
Just to be clear I've checked that this volume is not mounted using every method I know how (including those suggested here). I presume it is in use/being held somewhere, but I cannot determine where. It is only after running partprobe that I can no longer deactivate the LV. Is there any way to force the deactivation? Has anyone else come across this?
26/7 - Still not managed to progress on from this issue. I did, however, come across this forum post talking about an LV staying 'open' if mounted as a loop. Could this be what is happening here? Does partprobe
read using a loop mount? How can I see a list of active loop devices?