I'm using Ubuntu and am getting an error that tells me the filesystem can not be identified when I try to mount a LVM ext3 disk. I'm passing "ext3" as the type and have been able to mount ext2 disks. How can I mount the image?
-
What is the full command line you are passing to do the mount? Have you attempted to leave "-t" off, or even try mounting it as ext2?– AlexNov 2, 2011 at 16:30
-
sudo mount -o loop,offset=106928640 <image_path.dd> /mnt I get this error: "mount: unknown filesystem type 'LVM2_member'"– justforfunNov 2, 2011 at 16:37
-
Is the file an image of an entire disk? Or of a single partition? If the image is of a disk, does the disk have partitions or is the entire device an LVM PV?– larsksNov 2, 2011 at 19:06
-
Entire disk. The first partition (boot) is recognized and mounted as /dev/sdb1 and the second partition is the LVM (sdb2)– justforfunNov 2, 2011 at 19:19
-
2Try 'losetup /dev/loop0 <img.dd>; kpartx -av /dev/loop0; vgdisplay; pvdisplay'? You'll need to have the partition recognised as a physical volume in your LVM volume group before you can mount the logical volume.– AndrewNov 3, 2011 at 1:07
Add a comment
|
1 Answer
LVM adds extra layers between the device and the filesystem; namely
- devices become Physical Volumes (PVs)
- PVs are part of a Volume Group (VG)
- VGs contain Logical Volumes (LVs)
- LVs contain filesystems
To access the filesystem on the image of an LVM disk, you need to
- Loop-mount the image with
losetup /dev/loop0 <img.dd>
- Set up device maps with
kpartx -av /dev/loop0
- Check for volume groups, physical volumes and logical volumes with
vgdisplay
,pvdisplay
andlvdisplay
- Mount the relevant logical volume
-
1This might not work if the image is an old image of the PVs in the system - then the UUIDs, VG names and LV names inside it could collide...– glglglNov 14, 2011 at 8:26