1I'm trying to remove a physical volume from a VG
sudo vgreduce mirrorgroup /dev/sdb1
I made two PV sdb1 and sdb2 and mirrored this based on the activity I'm performing.
I needed to simulate a drive failure and this requires me to deactivate the LV and remove one of the PV (sdb1 or sdb2) but it outputs that both are still in use:
Physical volume /dev/sdb1 still in use
How can I do this?
To do: Simulate Drive Failure: Unmount the LV and deactivate it (lvchange -a n /dev/mirrorgroup/mirrorlv). Now, simulate a drive failure by removing one of the PVs from the VG using vgreduce /dev/mirrorgroup /dev/sdb1 (assuming /dev/sdb1 is the one being "removed").
lvdisplay
PS. I am running it on virtualbox and i thin kafter removing the PV i have to return it to simulate that i can access the files in it again