Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On a Virtual Machine Host Server I have a logical volume, /dev/my_volume_group/some_disk. The Logical volume "some_disk" has two partitions on it that were created by the guest machine. A swap and an ext3.

How can I access the ext3 partition from the host machine? I can only see the logical volume, not the partition(s) inside it? The host is a CentOS 6 Server.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Important: Either mount the filesystems inside the partitions read-only or make sure they are not mounted by a VM.

Than you can use the kpartx tool to mount the partitions, and if this is not available, use the offset option for mount. More details can be found in @kupson's and my answer to this question, just use the path to your logical volume instead of the image file name.

share|improve this answer
    
Thanks! For completeness, its kpartx -a /dev/my_volume_group/some_disk and then you'll be able to use /dev/mapper/my_volume_group-some_disk1 and /dev/mapper/my_volume_group-some_disk2 –  Nick Apr 3 '12 at 20:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.