-
Scan LVM volumes
sudo lvscan
-
Activate LVM volumes
modprobe dm-mod
vgchange -ay
-
List and remove mapped LVM devices
dmsetup ls
dmsetup remove <device>
where an example of "device
" can beVolGroup00-LogVol01
Troubleshooting
When you see an error message like the following when you try to mount a volume,
# mount /dev/VolGroup00/LogVol00 mnt/
mount: /dev/mapper/VolGroup00-LogVol00 is write-protected, mounting read-only
mount: /dev/mapper/VolGroup00-LogVol00: can't read superblock
One solution that has worked for me many times is to remove the mapped LVM devices using the command we discussed in the above. For instance,
# dmsetup remove VolGroup00-LogVol00
If you perform a
lvscan
, you will find that the volume is inactive,
# lvscan
inactive '/dev/VolGroup00/LogVol00' [459.53 GiB] inherit
To activate the volume, we can run the following
vgchange -ay
Now you shall see that the volume is active,
# lvscan
ACTIVE '/dev/VolGroup00/LogVol00' [459.53 GiB] inherit
We can now mount the volume,
# mount /dev/VolGroup00/LogVol00 mnt/