[clug] LVM Partion Access

Ben Coughlan ben.coughlan at gmail.com
Tue Sep 13 22:52:58 MDT 2011


LVM always seems to find volumes for me without any prompting.  You could always run 'pvscan' , 'pvs' and 'lvs' to see if LVM knows about the volume.

Ben

On 14/09/2011, at 2:21 PM, Brett Worth wrote:

> Hello All!
> 
> From time to time I have mounted a virtual machine's disk image file on the host server.  There are three scenarios:
> 
> 1.  The image file contains just a filesystem
> 	mount -o loop IMAGEFILE /mnt
> 
> 2.  The image has a partition table
> 	kpartx -av IMAGEFILE
> 	mount /dev/mapper/loop0pN /mnt
> 
> 3.  The image has a partition table and one of the partitions has been given to LVM.
> 	kpartx -av IMAGEFILE
> 	(magic commands)
> 	mount /dev/mapper/MyNewVolGroup-LogVol00 /mnt
> 
> Can someone tell me what goes in the brackets?  I have a feeling it will need to be imported into the host server's LVM config which means it would then have to be exported again before the VM can use it.
> 
> Anyone?
> 
> Brett
> -- 
> 
>  /) _ _ _/_/ / / /  _ _//
> /_)/</= / / (_(_/()/< ///
> -- 
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux



More information about the linux mailing list