I have a USB3 SSD which is an LVM VG and PV with two LVs on it. When I first insert the device, everything works fine; the volumes show up as /dev/dm-X
and links are created in /dev/mapper/<volume_name>
. If I then remove the device and re-insert it, it doesn't work. The mapper devices are not removed when the disk is removed and even if I remove them manually, they are not recreated when the disk is reinserted.
Is this a know defect? Can I configure around this? Is there a way to recover this without rebooting?
I don't really have a fix for this, but some notes:
Pulling the plug on an LVM2 volume is not a good idea. Clean up properly if you can. To take such a disk offline:
If you get in a mess with a disk that's been pulled, then you need to clean each logical volume up separately with:
After doing this, re-inserting the disk will do the right thing and map all the volumes correctly.