linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Bryn M. Reeves" <breeves@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] extracting EXT3 from VG
Date: Sat, 24 Mar 2007 12:17:03 +0000	[thread overview]
Message-ID: <460516BF.1080303@redhat.com> (raw)
In-Reply-To: <8466e51e0703231002l7af8b064mcfeac23e2d1b6535@mail.gmail.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.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGBRa/6YSQoMYUY94RAlyzAKCzFAYh3TXtpL0JuQ5RxANO1LahewCeKbz4
/E2z2S6BVx7QyUKJkuV4uek=
=kMMP
-----END PGP SIGNATURE-----

      reply	other threads:[~2007-03-24 12:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-23 17:02 [linux-lvm] extracting EXT3 from VG termeau sebastien
2007-03-24 12:17 ` Bryn M. Reeves [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=460516BF.1080303@redhat.com \
    --to=breeves@redhat.com \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).