Linux LVM users
 help / color / mirror / Atom feed
From: "Christian Völker" <chrischan@knebb.de>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] recovering data from inside a partitioned lv
Date: Mon, 22 Jun 2009 19:32:53 +0200	[thread overview]
Message-ID: <4A3FC045.1080709@knebb.de> (raw)
In-Reply-To: <104D56B6-A5AA-44BC-A1A6-EDCF2FC098A8@merit.edu>

Hi,

> Server has been rebooted, and now only /dev/vg1/lv1 is shown.  parted
> can open the lv and shows 1 partition inside, but doesn't understand
> ext3 volumes, so can't copy the partition to another disk.  tune2fs
> can't see /dev/vg1/lv1p1, or I'd use that to change the fs type to ext2.
I think the partition entry under /dev is missing. After the initial
fdisk it was created.
So two ways to recover:
-Open fdisk on the lv. Do not do any changes, but leave and (w)rite. I'd
say the entries lv1p1 will be re-created then. Mount it, copy the data
and get rid of partition.
-Use loop device. This is much more complicated but will work, though:
losetup -o$[512*63] /dev/loop1 /dev/vg1/lv1
So it will create a loop device /dev/loop1 from lv1 with an offset of
512*63 (default blocksize and partitioning schema, may vary thought) .
And then simply mount the loop device with the "-o loop" option for
mount. Copy and get rid of partition.

Hope this helps, let us know if it does.
GReetings

Christian

  reply	other threads:[~2009-06-22 17:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-22 17:23 [linux-lvm] recovering data from inside a partitioned lv Anthony Clark
2009-06-22 17:32 ` Christian Völker [this message]
2009-06-22 17:57   ` Anthony Clark
2009-06-22 17:42 ` Bryn M. Reeves

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=4A3FC045.1080709@knebb.de \
    --to=chrischan@knebb.de \
    --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