[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] Partition table gone? Any way to restore?



Well that's one of the things I need to know. How do I recover the partition. Only the first few bytes are missing from what I can tell.

'normally' an LVM disk would say that it didn't contain a valid partition. That part is missing from the disk and needs to be recoverd.

I've read that one could try pvcreate; vgcfgrestore.

I'm firstly making a backup of the disk with dd if=/dev/hde of=/mnt/hd/hde_raw_dump to ensure i can always 'go back' when I mess up.

gpart found my reiserfs partition (from the VG) so I suspect that all the data is still AOK. I'm just a little 'scared' to run pvcreate; vgcgrestore because when I want to 'list' my vgcgrestore I get the following error:

root enterprise:/mnt/hd# vgcfgrestore -n vg00 -l
vgcfgrestore -- INFO: using backup file "/etc/lvmconf/vg00.conf"
vgcfgrestore -- ERROR: different structure size stored in "/etc/lvmconf/vg00.conf" than expected in file vg_cfgrestore.c [line 120]
vgcfgrestore -- ERROR "vg_cfgrestore(): read" restoring volume group "vg00"


I suppose this could be because of the missing PV and it won't work untill I have all three PV's up again. However 'listing' should be fine?

Jean-Luc Coulon (f5ibh) wrote:

Le 02.03.2005 20:26:22, oliver a écrit :

Thanks! However the partition is fine and fit so I should be able to dd everything off of it.

The output of gpart was the following:
root enterprise:~# gpart -w hmlvm,1.5 /dev/hde

Begin scan...
Possible partition(ReiserFS filesystem), size(50431mb), offset(14mb)

* Warning: short read near sector(120103011), 64512 bytes instead of 66048. Skipp
ing...
End scan.


Checking partitions...
Partition(Linux ext2 filesystem): primary
Ok.

Guessed primary partition table:
Primary partition(1)
  type: 131(0x83)(Linux ext2 filesystem)
  size: 50431mb #s(103284656) s(29799-103314454)
  chs:  (29/9/1)-(1023/15/63)d (29/9/1)-(102494/7/62)r

Primary partition(2)
  type: 000(0x00)(unused)
  size: 0mb #s(0) s(0-0)
  chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
<snip> part 3 and 4 where 'unused'.

Now gpart found something, however not the missing LVM PV i was hoping. Or atleast, I don't think so. I will google around to see how to make a 1 on 1 copy of this disk, and then try to write it. I'll report back. In the mean time, keep those ideas comming : )


Just an idea, be careful, it is not the *truth* as I have not tested it yet.


Here is what I *think* :
The partition type is no matter for lvm.
Recover the partition as you like then do a fdisk to change the partition type to 8E ... and see (or pray)


J-L

( ... ]

------------------------------------------------------------------------

_______________________________________________
linux-lvm mailing list
linux-lvm redhat com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]