From: Chris Streeter <chris@chrisstreeter.com>
To: linux-lvm@redhat.com
Subject: [linux-lvm] Recovering Accidentally Destroyed LVM2 Information
Date: Tue, 26 Apr 2011 20:12:28 -0700 [thread overview]
Message-ID: <BANLkTinf5PWmfm2YOMshbOUvh3+ht89jhA@mail.gmail.com> (raw)
Ok, so I'm stupid and made a serious and grave mistake. On my linux
box running Ubuntu 10.10, I have a 1.5TB RAID array that I had
originally setup using the instructions located here:
http://www.gagme.com/greg/linux/raid-lvm.php The RAID array is a 4 x
500GB RAID 5 array with an ext3 formatted filesystem and is not my
boot device. The RAID array was just used for storage. The LVM setup
is a single physical volume (the RAID device) and a single logical
volume that makes up the entire physical volume.
So here is the list of steps that I ended up doing, based on the
contents of the files in /etc/lvm/archive (one file was created before
each step, and the file lists what the command was):
lvremove /dev/raid_vg/lv0
lvcreate -l 357702 raid_vg -n lv0
lvremove raid_vg
lvcreate -l 357702 raid_vg -n lv0
lvremove raid_vg
vgexport raid_vg
vgimport raid_vg
vgscan
lvremove raid_vg
vgcreate raid_vg /dev/md1
So, I accidentally called lvremove instead of lvchange -a n Then I
realized my mistake and tried to restore the logical volume. But that
made the disk seem empty.
Now, I'm not sure, but I don't think the data was wiped (at least not
all of it). I've cloned the device with ddrescue just so I don't loose
anything and can experiment on the image.
Now, my question is then, is it possible to restore the LVM
information to the disk and get my filesystem back? I've got the
configuration files in /etc/lvm/archive which give me the start
extents, sizes and extent counts.
Any help that anyone might be able to provide would be extremely
appreciated. I was an idiot and screwed myself. I just hope that it
was temporary and I can get my data back.
- Chris
next reply other threads:[~2011-04-27 3:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-27 3:12 Chris Streeter [this message]
2011-04-27 3:41 ` [linux-lvm] Recovering Accidentally Destroyed LVM2 Information Stuart D. Gathman
2011-04-27 3:58 ` Chris Streeter
2011-04-27 13:03 ` Stuart D. Gathman
2011-04-27 14:57 ` Ray Morris
2011-04-27 22:02 ` Chris Streeter
-- strict thread matches above, loose matches on Subject: below --
2011-04-27 3:07 Chris Streeter
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=BANLkTinf5PWmfm2YOMshbOUvh3+ht89jhA@mail.gmail.com \
--to=chris@chrisstreeter.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).