* [linux-lvm] restoring my lvm
@ 2006-04-21 23:06 Jannetta S Steyn
2006-04-22 8:06 ` Luca Berra
0 siblings, 1 reply; 7+ messages in thread
From: Jannetta S Steyn @ 2006-04-21 23:06 UTC (permalink / raw)
To: linux-lvm
Hi All
I would really appreciate some help with this problem. I found some
previous messages that seem to address problems similar to mine, but
because I would really like to not loose my data I would like some
specific guidance. Here is what happened. Everyting I am doing is on
Fedora Core 4.
I had a system with the following:
VolGroup00/LogVol00 (/dev/hda1 - swap)
VolGroup00/LogVol01 (/dev/hda2 - /)
Something happened and I was getting a bus error. I decided to just mount
this drive on another system and get my data off, not quite realising that
the system had an lvm because I just did a vanilla install in the
beginning. Once the drive was on the new system, I realised that it was an
lvm and I started reading the howto again from the beginning. What I
should have done was to read the howto first and then start doing, but
unfortunately I started doing and reading at the same time ...
My problem was that the new system (also FC4 and also a vanilla install)
already had VolGroup00. I then did a 'vgcreate VolGroup01 /dev/hdb2'. I
still couldn't figure out how to mount this drive, because now it didn't
have any logical volumes. This is where I stopped doing things because, if
possible I would like to get my data back.
I have now installed the drive in a system with VolGroup02. I get the
following information:
# vgscan
Reading all physical volumes. This may take a while...
Found volume group "VolGroup01" using metadata type lvm2
Found volume group "VolGroup02" using metadata type lvm2
# lvscan
ACTIVE '/dev/VolGroup02/LogVol00' [3.56 GB] inherit
ACTIVE '/dev/VolGroup02/LogVol01' [320.00 MB] inherit
# pvscan
PV /dev/hdb2 VG VolGroup01 lvm2 [2.93 GB / 2.93 GB free]
PV /dev/hda2 VG VolGroup02 lvm2 [3.91 GB / 32.00 MB free]
Total: 2 [6.83 GB] / in use: 2 [6.83 GB] / in no VG: 0 [0 ]
Can someone please give me some guidance on howto, if neccessary, recreate
the logical volumes for VolGroup01 and then mount it?
Many thanks to all reading and any help offered.
Regards
Jannetta
Random Thought:
---------------
Science may someday discover what faith has always known.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] restoring my lvm
2006-04-21 23:06 [linux-lvm] restoring my lvm Jannetta S Steyn
@ 2006-04-22 8:06 ` Luca Berra
2006-04-22 17:40 ` Jannetta S Steyn
0 siblings, 1 reply; 7+ messages in thread
From: Luca Berra @ 2006-04-22 8:06 UTC (permalink / raw)
To: linux-lvm
On Sat, Apr 22, 2006 at 12:06:55AM +0100, Jannetta S Steyn wrote:
>My problem was that the new system (also FC4 and also a vanilla install)
>already had VolGroup00. I then did a 'vgcreate VolGroup01 /dev/hdb2'. I
vgcreate = msdos format
you just wiped your disk
>PV /dev/hdb2 VG VolGroup01 lvm2 [2.93 GB / 2.93 GB free]
>PV /dev/hda2 VG VolGroup02 lvm2 [3.91 GB / 32.00 MB free]
>Total: 2 [6.83 GB] / in use: 2 [6.83 GB] / in no VG: 0 [0 ]
if you are certain that the previous logical volume spanned the whole
disk, you can:
# vgdisplay /dev/VolGroup01
and look at the "Total PE" value, then
# lvcreate -Z n -l TOTAL_PE -n LogVol01 /dev/VolGroup01
but i'd rater first try with http://www.cgsecurity.org/wiki/TestDisk
which might be able to recover the damage you did.
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [linux-lvm] restoring my lvm
2006-04-22 8:06 ` Luca Berra
@ 2006-04-22 17:40 ` Jannetta S Steyn
2006-04-22 18:49 ` Jannetta S Steyn
2006-04-23 4:44 ` Luca Berra
0 siblings, 2 replies; 7+ messages in thread
From: Jannetta S Steyn @ 2006-04-22 17:40 UTC (permalink / raw)
To: LVM general discussion and development
Hi Luca
> On Sat, Apr 22, 2006 at 12:06:55AM +0100, Jannetta S Steyn wrote:
>>My problem was that the new system (also FC4 and also a vanilla install)
>>already had VolGroup00. I then did a 'vgcreate VolGroup01 /dev/hdb2'. I
> vgcreate = msdos format
> you just wiped your disk
It didn't take very long and didn't give any warnings, so I thought it
just wrote the volume name to somewhere on the disk.
> if you are certain that the previous logical volume spanned the whole
> disk, you can:
> # vgdisplay /dev/VolGroup01
vgdisplay /dev/VolGroup01
--- Volume group ---
VG Name VolGroup01
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 2.93 GB
PE Size 4.00 MB
Total PE 749
Alloc PE / Size 0 / 0
Free PE / Size 749 / 2.93 GB
VG UUID Fv9M5d-0VU8-PiyT-yg4g-FY2C-Ogcc-30klLO
> and look at the "Total PE" value, then
> # lvcreate -Z n -l TOTAL_PE -n LogVol01 /dev/VolGroup01
What I'm certain about is that there are two partitions on the disk:
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 203 102280+ 83 Linux
/dev/hdb2 204 6296 3070872 8e Linux LVM
/dev/hdb2 has two physical volumes, the first a swap and the second data.
> but i'd rater first try with http://www.cgsecurity.org/wiki/TestDisk
> which might be able to recover the damage you did.
I have downloaded testdisk and this is what I get:
TestDisk 6.3, Data Recovery Utility, March 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
Disk /dev/hdb - 3249 MB / 3098 MiB - CHS 6296 16 63
Partition Start End Size in sectors
* Linux 0 1 1 202 15 63 204561 [/boot]
D Linux 203 0 1 5645 15 63 5486544 [/]
D Linux LVM 203 0 1 6295 15 63 6141744
D Linux 229 0 1 5560 15 63 5374656
D Linux 265 0 1 5596 15 63 5374656
Any suggestions as to what I could do now?
Thanks so far
Jannetta
Random Thought:
---------------
Two men were sitting over coffee, contemplating the nature of things,
with all due respect for their breakfast. "I wonder why it is that
toast always falls on the buttered side," said one.
"Tell me," replied his friend, "why you say such a thing. Look
at this." And he dropped his toast on the floor, where it landed on the
dry side.
"So, what have you to say for your theory now?"
"What am I to say? You obviously buttered the wrong side."
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [linux-lvm] restoring my lvm
2006-04-22 17:40 ` Jannetta S Steyn
@ 2006-04-22 18:49 ` Jannetta S Steyn
2006-04-23 4:44 ` Luca Berra
1 sibling, 0 replies; 7+ messages in thread
From: Jannetta S Steyn @ 2006-04-22 18:49 UTC (permalink / raw)
To: jannetta, LVM general discussion and development
Hi Luca
I made an error in my previous post. I wrote:
> /dev/hdb2 has two physical volumes, the first a swap and the second data.
It should be:
/dev/hdb2 has two logical volumes, the first a swap and the second data.
Regards
Jannetta
>
Random Thought:
---------------
Klein bottle for rent -- inquire within.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] restoring my lvm
2006-04-22 17:40 ` Jannetta S Steyn
2006-04-22 18:49 ` Jannetta S Steyn
@ 2006-04-23 4:44 ` Luca Berra
2006-04-23 8:08 ` Jannetta S Steyn
1 sibling, 1 reply; 7+ messages in thread
From: Luca Berra @ 2006-04-23 4:44 UTC (permalink / raw)
To: LVM general discussion and development
On Sat, Apr 22, 2006 at 06:40:36PM +0100, Jannetta S Steyn wrote:
>Hi Luca
>
>> On Sat, Apr 22, 2006 at 12:06:55AM +0100, Jannetta S Steyn wrote:
>>>My problem was that the new system (also FC4 and also a vanilla install)
>>>already had VolGroup00. I then did a 'vgcreate VolGroup01 /dev/hdb2'. I
>> vgcreate = msdos format
>> you just wiped your disk
>
>It didn't take very long and didn't give any warnings, so I thought it
>just wrote the volume name to somewhere on the disk.
unfortunately it also wipes out informations about logical volumes into
the vg. data is not damaged, only you don't know where it is.
and since the VG backups were on one of the inaccessible logical volume
you cannot use those for recovery.
...
>I have downloaded testdisk and this is what I get:
>
>TestDisk 6.3, Data Recovery Utility, March 2006
>Christophe GRENIER <grenier@cgsecurity.org>
>http://www.cgsecurity.org
>
>Disk /dev/hdb - 3249 MB / 3098 MiB - CHS 6296 16 63
> Partition Start End Size in sectors
>* Linux 0 1 1 202 15 63 204561 [/boot]
>D Linux 203 0 1 5645 15 63 5486544 [/]
>D Linux LVM 203 0 1 6295 15 63 6141744
>D Linux 229 0 1 5560 15 63 5374656
>D Linux 265 0 1 5596 15 63 5374656
>
try with each of the linux partitions found and see if you can mount it
and get your data back.
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [linux-lvm] restoring my lvm
2006-04-23 4:44 ` Luca Berra
@ 2006-04-23 8:08 ` Jannetta S Steyn
2006-04-23 9:04 ` Luca Berra
0 siblings, 1 reply; 7+ messages in thread
From: Jannetta S Steyn @ 2006-04-23 8:08 UTC (permalink / raw)
To: LVM general discussion and development
Hi Luca
>>Disk /dev/hdb - 3249 MB / 3098 MiB - CHS 6296 16 63
>> Partition Start End Size in sectors
>>* Linux 0 1 1 202 15 63 204561 [/boot]
>>D Linux 203 0 1 5645 15 63 5486544 [/]
>>D Linux LVM 203 0 1 6295 15 63 6141744
>>D Linux 229 0 1 5560 15 63 5374656
>>D Linux 265 0 1 5596 15 63 5374656
>>
>
> try with each of the linux partitions found and see if you can mount it
> and get your data back.
If I look at the way Redhat created a similar on a working system, I get
the following information for the lv's created:
# lvscan
ACTIVE '/dev/VolGroup02/LogVol00' [3.56 GB] inherit
ACTIVE '/dev/VolGroup02/LogVol01' [320.00 MB] inherit
Based on the above information, would you say that it is a reasonable to
say that on the broken drive, the first lv was LogVol00, used for data and
the second lv would have been LogVol01, used for swap. Could I, like you
suggested create a logical volume for the total size and perhaps get my
data back (since the swap is at the end of it all?)
Is creating a logical volume with lvcreate also only adjusting the
information about the lvm and not actually touching the data, which means
I can safely experiment, trying to change the lv's until I find the
correct size? (I hope my questions make sense)
Regards
Jannetta
Random Thought:
---------------
If you are smart enough to know that you're not smart enough to be an
Engineer, then you're in Business.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] restoring my lvm
2006-04-23 8:08 ` Jannetta S Steyn
@ 2006-04-23 9:04 ` Luca Berra
0 siblings, 0 replies; 7+ messages in thread
From: Luca Berra @ 2006-04-23 9:04 UTC (permalink / raw)
To: jannetta, LVM general discussion and development
On Sun, Apr 23, 2006 at 09:08:40AM +0100, Jannetta S Steyn wrote:
>Hi Luca
>
>>>Disk /dev/hdb - 3249 MB / 3098 MiB - CHS 6296 16 63
>>> Partition Start End Size in sectors
>>>* Linux 0 1 1 202 15 63 204561 [/boot]
>>>D Linux 203 0 1 5645 15 63 5486544 [/]
>>>D Linux LVM 203 0 1 6295 15 63 6141744
>>>D Linux 229 0 1 5560 15 63 5374656
>>>D Linux 265 0 1 5596 15 63 5374656
>>>
>>
>> try with each of the linux partitions found and see if you can mount it
>> and get your data back.
>
>If I look at the way Redhat created a similar on a working system, I get
>the following information for the lv's created:
>
># lvscan
> ACTIVE '/dev/VolGroup02/LogVol00' [3.56 GB] inherit
> ACTIVE '/dev/VolGroup02/LogVol01' [320.00 MB] inherit
>
>Based on the above information, would you say that it is a reasonable to
>say that on the broken drive, the first lv was LogVol00, used for data and
>the second lv would have been LogVol01, used for swap. Could I, like you
>suggested create a logical volume for the total size and perhaps get my
>data back (since the swap is at the end of it all?)
>
>Is creating a logical volume with lvcreate also only adjusting the
>information about the lvm and not actually touching the data, which means
>I can safely experiment, trying to change the lv's until I find the
>correct size? (I hope my questions make sense)
>
yes, but remember the "-Z n" option to lvcreate, or it will wipe the
first 1k of your data.
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-04-23 9:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-21 23:06 [linux-lvm] restoring my lvm Jannetta S Steyn
2006-04-22 8:06 ` Luca Berra
2006-04-22 17:40 ` Jannetta S Steyn
2006-04-22 18:49 ` Jannetta S Steyn
2006-04-23 4:44 ` Luca Berra
2006-04-23 8:08 ` Jannetta S Steyn
2006-04-23 9:04 ` Luca Berra
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.