From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx2.redhat.com (mx2.redhat.com [10.255.15.25]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l2QGGAet007885 for ; Mon, 26 Mar 2007 12:16:10 -0400 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx2.redhat.com (8.13.1/8.13.1) with ESMTP id l2QGG0Bf004871 for ; Mon, 26 Mar 2007 12:16:00 -0400 Received: by ug-out-1314.google.com with SMTP id x30so1606208ugc for ; Mon, 26 Mar 2007 09:15:59 -0700 (PDT) Message-ID: <8466e51e0703260915g6b3840d5p4c43bc2a670cfd49@mail.gmail.com> Date: Mon, 26 Mar 2007 18:15:57 +0200 From: "termeau sebastien" Subject: (SOLVED] Re: [linux-lvm] extracting EXT3 from VG MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_275570_26158052.1174925757950" Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: To: LVM general discussion and development ------=_Part_275570_26158052.1174925757950 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 2007/3/24, Bryn M. Reeves : > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > termeau sebastien wrote: > > Hello, > > > > I have an hard drive image in a file. > > If I try to mount it directly using "mount -o loop my_file.img > > /mnt/my_dd", fdisk reports > > mount: unknown filesystem type 'LVM2_member' > > This image contains a volume group that itself contains 4 logical vol > > group. > > lvscan reports: > > LogVol00 2.94GB > > LogVol03 64MB > > LogVol02 256MB > > LogVol01 2.31GB > > Put the image file on a loop device, then activate the volume group it > contains: > > losetup /dev/loop0 my_file.img > vgscan > vgchange -ay > > Then you should be able to access it as normal. Just dd the file system > off the LV device node. > > To shut it down: > > vgchange -an > losetup -d /dev/loop0 > > Obviously, change loop0 to something else if 0 is already in use. > > Kind regards, > > Bryn. > > Thank you for your help it works fine :-) ------=_Part_275570_26158052.1174925757950 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

2007/3/24, Bryn M. Reeves <breeves@redhat.com>:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

termeau sebastien wrote:
> Hello,
>
> I have an hard drive image in a file.
> If I try to mount it directly using "mount -o loop my_file.img
> /mnt/my_dd", fdisk reports
>   mount: unknown filesystem type 'LVM2_member'
> This image contains a volume group that itself contains 4 logical vol
> group.
> lvscan reports:
>   LogVol00  2.94GB
>   LogVol03  64MB
>   LogVol02  256MB
>   LogVol01  2.31GB

Put the image file on a loop device, then activate the volume group it
contains:

losetup /dev/loop0 my_file.img
vgscan
vgchange -ay <vg name>

Then you should be able to access it as normal. Just dd the file system
off the LV device node.

To shut it down:

vgchange -an <vg name>
losetup -d /dev/loop0

Obviously, change loop0 to something else if 0 is already in use.

Kind regards,

Bryn.


Thank you for your help it works fine :-)
------=_Part_275570_26158052.1174925757950--