What commands can be used to unmount or unmap an LVM volume, or otherwise prepare the physical media containing it to be ejected?
I confess, despite using the command line for many years, I still primarily use graphical tools to mount and unmount filesystems or LUKS partitions; therefore, I am not as knowledgeable about mounts/mappings as I perhaps should be.
With that in mind,
I was inspecting a removable drive that used LVM, and while I was able to use a GUI to map to a location in /dev/mapper/
and mount the filesystem within, I am not familiar with how to unmap the LVM volume now that I have unmounted the filesystem via umount
.
Everything I have been able to find documenting LVM treats both PVs and LVs as if they are only able to be created or destroyed.
Any forum or Q&A post I could find while searching the web for unmounting or unmapping LVM likewise only gave instructions for migrating data away from a drive/partition in preparation for it to be permanently removed from the VG, or simply deleting the LVM setup entirely.
A rough diagram for the anyone unfamiliar with LVM:
LV (Logical Volume; /dev/mapper/__
) → VG (Volume Group) → PV (Physical Volume; an actual partition on-disk)