From: Jim N Cromie <james.cromie@juno.com>
To: linux-lvm@sistina.com
Subject: [linux-lvm] pv recovery after trashing partition table.
Date: Fri, 12 Oct 2001 18:18:56 -0600 [thread overview]
Message-ID: <20011012.181856.-303677.1.james.cromie@juno.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2637 bytes --]
Q: how is 'dd' like motorcycles ?
A: there are 2 types of users, those who have crashed, and those who
will.
Well, Ive now joined the ranks of folks who have. I blew away the hda
partition table.
/dev/hda4 used to have a good PV.
Miraculously, Ive successfully recovered hda[1-3], by a combination of
luck,
a simple partition table (1=vfat, 2=swap, 3=ext2, 4=lvm, on cylinder
boundaries), good notes (I had the cylinder numbers mostly written down),
and perseverance with fdisk. I wrote experimental partition-tables
untill I was able to mount them.
Just imagine my glee when hda3 fsck'd good !
So now, Im trying to recover hda4 now, with LVM volumes intact;
vgcfgrestore -l -l -v -d -n _vgb, reports 2 PVs, hdb2, hda4, both are
available, with some unusable, ( I cant cut-paste here, different
computer, cant boot clean without /var
pvscan however reports 2 different PVs, hdb2, and hdc9
Im guessing that I did a pvcreate /dev/hdc9 after some snapshot/backup,
since hdc9 isnt there. This suggests that my chances of recovery are
poorer than otherwize. I never actually did a vgcfgsave - Ive only been
a couple of weeks with LVM, and it was only /tmp...
anyway, pvdata /dev/hda4 shows bogus (ie unfavorable, not wrong) data in
the PV, it also segfaults, $? is 139
PV size 8 / Not usable 262 GB [LVM 3.71 GB]
PV# 0
PE Size(KB) 250
uuid none
btw - 3.71 GB is reasonable, the hda4 has ~3.9 GB
$> pvdisplay /dev/hda4
-- no physical volume identifier
vgcfgrestore gives error when I try above:
ERROR: pv_read(): PV identifer invalid" reading physical volume
/dev/hda4
I should mention; I dont understand how sectors in hda4 got corrupted,
at least by my dd ( I did have bs=512 count=1, and hda[1-3] are ok).
Something else may be missing..
SO, WHAT IF ANY ARE MY OPTIONS ?
1) Would a carefully considered set of 'dd' commands possibly
restore it? I have nothing to lose in hda4 at this point.
2) IS IT POSSIBLE THAT DESPITE MY SUCCESS MOUNTING hda 1-3, particularly
hda3, since thats ext2, (ie a real filesystem, with a real fsck). Ive
somehow got the partitions wrong, and thus pvdata is looking in the wrong
disk sector for its meta-data ?
3) is it possible to use fdisk to change partition type to Linux, then do
an fsck ?
Im theorizing that fsck will find 3 different ext2 super-blocks somewhere
within the previously mountable LVM partition ?
I think I can claim enough space elsewhere, and make a file-clone of the
partition, if so, I can let fsck do all its repair attempts w/o trashing
the possibility
of using approaches 1,2
tia
jimc
[-- Attachment #2: Type: text/html, Size: 4191 bytes --]
next reply other threads:[~2001-10-13 0:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-13 0:18 Jim N Cromie [this message]
2001-10-13 0:11 ` [linux-lvm] pv recovery after trashing partition table Andreas Dilger
2001-10-13 18:40 ` [linux-lvm] pv recovery after trashing partition table. OK - back to normal Jim Cromie
-- strict thread matches above, loose matches on Subject: below --
2001-10-13 2:45 [linux-lvm] pv recovery after trashing partition table Jim N Cromie
2001-10-13 5:43 ` Andreas Dilger
2001-10-13 2:50 Jim N Cromie
2001-10-13 8:20 Jim Cromie
2001-10-13 8:40 ` Andreas Dilger
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=20011012.181856.-303677.1.james.cromie@juno.com \
--to=james.cromie@juno.com \
--cc=linux-lvm@sistina.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).