linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] extracting EXT3 from VG
@ 2007-03-23 17:02 termeau sebastien
  2007-03-24 12:17 ` Bryn M. Reeves
  0 siblings, 1 reply; 2+ messages in thread
From: termeau sebastien @ 2007-03-23 17:02 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]

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

I want to extract the ext3 filesystem included in LogVol00 to a file using
something like:
  dd if=my_file.img bs=512 skip=??? count=??? of=my_ext3.img

How can I determine the skip and count parameter to only extract the ext3
filesystem?

Thanks


-- 
Virtue is its own punishment.
  - Aneurin Bevan

[-- Attachment #2: Type: text/html, Size: 810 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-lvm] extracting EXT3 from VG
  2007-03-23 17:02 [linux-lvm] extracting EXT3 from VG termeau sebastien
@ 2007-03-24 12:17 ` Bryn M. Reeves
  0 siblings, 0 replies; 2+ messages in thread
From: Bryn M. Reeves @ 2007-03-24 12:17 UTC (permalink / raw)
  To: LVM general discussion and development

-----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-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-24 12:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-23 17:02 [linux-lvm] extracting EXT3 from VG termeau sebastien
2007-03-24 12:17 ` Bryn M. Reeves

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).