Re: How can I grab the filesystem from corrupted lvm (help recover data from lvm with one pv missing)
Bad. Depends on the amount of damage you have created, the following procedure would work: I believe the failure is in /dev/sda8, around 30GB, based on your fileserver lvm backup file. Upload an older one for me to be sure. pvcreate -u GBsXFQ-RdXS-iMhp-Phle-iqfM-5571-aJgQAa /dev/sda8 (if successful), try the following: in /etc/lvm/backup, find a file describing a good configuration, before you attempted to force-remove the PV. You can perform the following action then: vgcfgrestore -f the file you have found, and hopefully uploaded here fileserver If successful, run: vgchange -ay fileserver and you should be able to mount whatever LV you did not run over with zeros. Good luck Ez On Mon, Oct 11, 2010 at 11:20 PM, Oron Peled o...@actcom.co.il wrote: On Monday, 11 בOctober 2010 11:50:45 Boris shtrasman wrote: On Mon, Oct 11, 2010 at 11:45 AM, Yedidyah Bar-David Not gparted, gpart: http://www.brzitwa.de/mb/gpart/index.html Gpart is a tool which tries to guess the primary partition table of a PC-type hard disk in case the primary partition table in sector 0 is damaged, incorrect or deleted. If you fail, and still want to resurrect specific files, you can also try MagicRescue: http://www.itu.dk/people/jobr/magicrescue/ looks promising thank you And i was dding file by file :-( from the disk .. Just take notice that sequencial logical volume (partition) may be not sequencial on the physical volume (There's a logical extent to physical extent mapping). However, there is a good chance most/all of your partition is sequencial, especially if you created the volume group and the logical volumes when the disk was empty (e.g: during installation) without requiring a striped logical volume (it's not the default). Good luck, -- Oron Peled Voice: +972-4-8228492 o...@actcom.co.il http://users.actcom.co.il/~oron ... one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. -- Robert Firth ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: How can I grab the filesystem from corrupted lvm (help recover data from lvm with one pv missing)
/dev/sda8 had been wiped out totally The other restore fails : vgcfgrestore -f fileserver fileserver File descriptor 13 (socket:[7450]) leaked on vgcfgrestore invocation. Parent PID 3952: bash Couldn't find device with uuid fVkJmY-pdwD-bub8-URE8-lNc2-eyhr-IIxIez. Cannot restore Volume Group fileserver with 1 PVs marked as missing. Restore failed. Today ill try to create again an image of the drive (dd all the drive ) in order not make any more damage by restore attempts, Yesterday I found out that the harddrive going to die (errors from the kernel). 2010/10/12 Etzion Bar-Noy eza...@tournament.org.il Bad. Depends on the amount of damage you have created, the following procedure would work: I believe the failure is in /dev/sda8, around 30GB, based on your fileserver lvm backup file. Upload an older one for me to be sure. pvcreate -u GBsXFQ-RdXS-iMhp-Phle-iqfM-5571-aJgQAa /dev/sda8 (if successful), try the following: in /etc/lvm/backup, find a file describing a good configuration, before you attempted to force-remove the PV. You can perform the following action then: vgcfgrestore -f the file you have found, and hopefully uploaded here fileserver If successful, run: vgchange -ay fileserver and you should be able to mount whatever LV you did not run over with zeros. Good luck Ez On Mon, Oct 11, 2010 at 11:20 PM, Oron Peled o...@actcom.co.il wrote: On Monday, 11 בOctober 2010 11:50:45 Boris shtrasman wrote: On Mon, Oct 11, 2010 at 11:45 AM, Yedidyah Bar-David Not gparted, gpart: http://www.brzitwa.de/mb/gpart/index.html Gpart is a tool which tries to guess the primary partition table of a PC-type hard disk in case the primary partition table in sector 0 is damaged, incorrect or deleted. If you fail, and still want to resurrect specific files, you can also try MagicRescue: http://www.itu.dk/people/jobr/magicrescue/ looks promising thank you And i was dding file by file :-( from the disk .. Just take notice that sequencial logical volume (partition) may be not sequencial on the physical volume (There's a logical extent to physical extent mapping). However, there is a good chance most/all of your partition is sequencial, especially if you created the volume group and the logical volumes when the disk was empty (e.g: during installation) without requiring a striped logical volume (it's not the default). Good luck, -- Oron Peled Voice: +972-4-8228492 o...@actcom.co.il http://users.actcom.co.il/~oronhttp://users.actcom.co.il/%7Eoron ... one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. -- Robert Firth ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il -- -- -- Boris Shtrasman |Gnu/Linux Software developer | | IM : bori...@jabber.org | | URL : myrtfm.blogspot.com| ___ ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: How can I grab the filesystem from corrupted lvm (help recover data from lvm with one pv missing)
Did you use pvcreate -u on the drive? Without it, it won't work. Also - you *must* use a backup configuration file with all the data in it. Post one of these online, and I would be able to assist further. Ez 2010/10/12 Boris shtrasman borissh1...@gmail.com /dev/sda8 had been wiped out totally The other restore fails : vgcfgrestore -f fileserver fileserver File descriptor 13 (socket:[7450]) leaked on vgcfgrestore invocation. Parent PID 3952: bash Couldn't find device with uuid fVkJmY-pdwD-bub8-URE8-lNc2-eyhr-IIxIez. Cannot restore Volume Group fileserver with 1 PVs marked as missing. Restore failed. Today ill try to create again an image of the drive (dd all the drive ) in order not make any more damage by restore attempts, Yesterday I found out that the harddrive going to die (errors from the kernel). 2010/10/12 Etzion Bar-Noy eza...@tournament.org.il Bad. Depends on the amount of damage you have created, the following procedure would work: I believe the failure is in /dev/sda8, around 30GB, based on your fileserver lvm backup file. Upload an older one for me to be sure. pvcreate -u GBsXFQ-RdXS-iMhp-Phle-iqfM-5571-aJgQAa /dev/sda8 (if successful), try the following: in /etc/lvm/backup, find a file describing a good configuration, before you attempted to force-remove the PV. You can perform the following action then: vgcfgrestore -f the file you have found, and hopefully uploaded here fileserver If successful, run: vgchange -ay fileserver and you should be able to mount whatever LV you did not run over with zeros. Good luck Ez On Mon, Oct 11, 2010 at 11:20 PM, Oron Peled o...@actcom.co.il wrote: On Monday, 11 בOctober 2010 11:50:45 Boris shtrasman wrote: On Mon, Oct 11, 2010 at 11:45 AM, Yedidyah Bar-David Not gparted, gpart: http://www.brzitwa.de/mb/gpart/index.html Gpart is a tool which tries to guess the primary partition table of a PC-type hard disk in case the primary partition table in sector 0 is damaged, incorrect or deleted. If you fail, and still want to resurrect specific files, you can also try MagicRescue: http://www.itu.dk/people/jobr/magicrescue/ looks promising thank you And i was dding file by file :-( from the disk .. Just take notice that sequencial logical volume (partition) may be not sequencial on the physical volume (There's a logical extent to physical extent mapping). However, there is a good chance most/all of your partition is sequencial, especially if you created the volume group and the logical volumes when the disk was empty (e.g: during installation) without requiring a striped logical volume (it's not the default). Good luck, -- Oron Peled Voice: +972-4-8228492 o...@actcom.co.il http://users.actcom.co.il/~oronhttp://users.actcom.co.il/%7Eoron ... one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. -- Robert Firth ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il -- -- -- Boris Shtrasman |Gnu/Linux Software developer | | IM : bori...@jabber.org | | URL : myrtfm.blogspot.com| ___ ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
How can I grab the filesystem from corrupted lvm (help recover data from lvm with one pv missing)
Hi, Yesterday my harddrive had an inconvenient event: when I was using a d-i from testing I accidentally overwritten on of the pv's connected to the lvm. I started to panic and found myself making more damage by running vgreduce --*remove*-*missing* since in one of the rescue files it noted this is the way to fix it. the config was : /dev/sda7 pv0 /dev/sda8 pv1 digging in the parrtion i found the lvm declaration : 0200 4c 41 42 45 4c 4f 4e 45 01 00 00 00 00 00 00 00 |LABELONE| 0210 e1 4c e7 48 20 00 00 00 4c 56 4d 32 20 30 30 31 |.L.H ...LVM2 001| 0220 47 42 73 58 46 51 52 64 58 53 69 4d 68 70 50 68 |GBsXFQRdXSiMhpPh| 0230 6c 65 69 71 66 4d 35 35 37 31 61 4a 67 51 41 61 |leiqfM5571aJgQAa| 0240 00 8c 71 7c 07 00 00 00 00 00 03 00 00 00 00 00 |..q|| 0250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 || 0260 00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 || 0270 00 f0 02 00 00 00 00 00 00 00 00 00 00 00 00 00 || 0280 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 || digging in the raw data of the /dev/sda7 (I think) I found(*) the filesystems that were on the lvm : 0002fff0 b8 ff 74 b8 ff 74 b8 ff 74 b8 ff 74 b8 ff 74 b8 |..t..t..t..t..t.| 0003 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 || * 00030400 00 20 25 00 00 70 94 00 00 6c 07 00 13 13 4e 00 |. %..p...lN.| 00030410 01 f0 24 00 00 00 00 00 02 00 00 00 02 00 00 00 |..$.| 00030420 00 80 00 00 00 80 00 00 00 20 00 00 05 dc b0 4c |. .L| 00030430 c4 df b0 4c a2 01 25 00 53 ef 01 00 01 00 00 00 |...L..%.S...| 00030440 ae b0 f2 4a 00 4e ed 00 00 00 00 00 01 00 00 00 |...J.N..| 00030450 00 00 00 00 0b 00 00 00 00 01 00 00 3c 00 00 00 |...| 00030460 02 00 00 00 03 00 00 00 6f c8 71 b2 99 4e 4c 1f |o.q..NL.| 00030470 85 25 3e e9 9a 2c 55 45 00 00 00 00 00 00 00 00 |.%..,UE| 00030480 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 || knowing the sizes I dd data (this is from memory) - I think the partition startes 3 hence 3*16^4 / 1024 = 192 dd if=/dev/sda7 of=filename bs=1024 count=16M seek=192 tried to mount but without success. (1) - hd /dev/sda7 | less found what i think is the superblock : I found that during the tut I run the hence getting a backup of some of the data (from backup/fileserver) # Generated by LVM2 version 2.02.66(2) (2010-05-20): Sun Oct 10 01:09:27 2010 contents = Text Format Volume Group version = 1 description = Created *after* executing 'vgcfgbackup' creation_host = midgard # Linux midgard 2.6.32-5-amd64 #1 SMP Thu Aug 12 13:01:50 UTC 2010 x86_64 creation_time = 1286665767 # Sun Oct 10 01:09:27 2010 fileserver { id = YKE4Rs-gcaS-oWuy-8dVG-0Loq-MrsL-8m7K8v seqno = 11 status = [RESIZEABLE, READ, WRITE] flags = [] extent_size = 8192 # 4 Megabytes max_lv = 0 max_pv = 0 physical_volumes { pv0 { id = GBsXFQ-RdXS-iMhp-Phle-iqfM-5571-aJgQAa device = /dev/sda7# Hint only status = [ALLOCATABLE] flags = [] dev_size = 62798022 # 29.9444 Gigabytes pe_start = 384 pe_count = 7665 # 29.9414 Gigabytes } pv1 { id = fVkJmY-pdwD-bub8-URE8-lNc2-eyhr-IIxIez device = unknown device # Hint only status = [ALLOCATABLE] flags = [MISSING] dev_size = 79409232 # 37.8653 Gigabytes pe_start = 384 pe_count = 9693 # 37.8633 Gigabytes } } logical_volumes { video { id = wuLloD-3u0J-YHeu-Glxk-fsbC-tOyp-RbGBws status = [READ, WRITE, VISIBLE] flags = [] segment_count = 2 segment1 { start_extent = 0 extent_count = 7665 # 29.9414 Gigabytes type = striped stripe_count = 1# linear stripes = [ pv0, 0 ] } segment2 { start_extent = 7665 extent_count = 2063 # 8.05859 Gigabytes type = striped stripe_count = 1# linear stripes = [ pv1, 0
Re: How can I grab the filesystem from corrupted lvm (help recover data from lvm with one pv missing)
On Mon, Oct 11, 2010 at 10:36:33AM +0200, Boris shtrasman wrote: Hi, Yesterday my harddrive had an inconvenient event: when I was using a d-i from testing I accidentally overwritten on of the pv's connected to the lvm. I started to panic and found myself making more damage by running vgreduce --*remove*-*missing* since in one of the rescue files it noted this is the way to fix it. [snip] Did you try gpart? -- Didi ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: How can I grab the filesystem from corrupted lvm (help recover data from lvm with one pv missing)
On Mon, Oct 11, 2010 at 11:33 AM, Yedidyah Bar-David linux...@didi.bardavid.org wrote: On Mon, Oct 11, 2010 at 10:36:33AM +0200, Boris shtrasman wrote: Hi, Yesterday my harddrive had an inconvenient event: when I was using a d-i from testing I accidentally overwritten on of the pv's connected to the lvm. I started to panic and found myself making more damage by running vgreduce --*remove*-*missing* since in one of the rescue files it noted this is the way to fix it. [snip] Did you try gpart? -- Didi I hope I did not miss something gparted see the parttion /dev/sda7 and recognize it as lvm but nothing from there. except that I got LVM isn't yet supported. it looks like the metedata is corrupted but the actual information is there (as when you loose the the parrtion table from the mbr (446-510)) -- -- -- Boris Shtrasman |Gnu/Linux Software developer | | IM : bori...@jabber.org | | URL : myrtfm.blogspot.com| ___ ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: How can I grab the filesystem from corrupted lvm (help recover data from lvm with one pv missing)
On Mon, Oct 11, 2010 at 11:41:38AM +0200, Boris shtrasman wrote: On Mon, Oct 11, 2010 at 11:33 AM, Yedidyah Bar-David linux...@didi.bardavid.org wrote: On Mon, Oct 11, 2010 at 10:36:33AM +0200, Boris shtrasman wrote: Hi, Yesterday my harddrive had an inconvenient event: when I was using a d-i from testing I accidentally overwritten on of the pv's connected to the lvm. I started to panic and found myself making more damage by running vgreduce --*remove*-*missing* since in one of the rescue files it noted this is the way to fix it. [snip] Did you try gpart? -- Didi I hope I did not miss something gparted see the parttion /dev/sda7 and recognize it as lvm but nothing from there. except that I got LVM isn't yet supported. it looks like the metedata is corrupted but the actual information is there (as when you loose the the parrtion table from the mbr (446-510)) Not gparted, gpart: http://www.brzitwa.de/mb/gpart/index.html Gpart is a tool which tries to guess the primary partition table of a PC-type hard disk in case the primary partition table in sector 0 is damaged, incorrect or deleted. If you fail, and still want to resurrect specific files, you can also try MagicRescue: http://www.itu.dk/people/jobr/magicrescue/ -- Didi ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: How can I grab the filesystem from corrupted lvm (help recover data from lvm with one pv missing)
On Mon, Oct 11, 2010 at 11:45 AM, Yedidyah Bar-David linux...@didi.bardavid.org wrote: On Mon, Oct 11, 2010 at 11:41:38AM +0200, Boris shtrasman wrote: On Mon, Oct 11, 2010 at 11:33 AM, Yedidyah Bar-David linux...@didi.bardavid.org wrote: On Mon, Oct 11, 2010 at 10:36:33AM +0200, Boris shtrasman wrote: Hi, Yesterday my harddrive had an inconvenient event: when I was using a d-i from testing I accidentally overwritten on of the pv's connected to the lvm. I started to panic and found myself making more damage by running vgreduce --*remove*-*missing* since in one of the rescue files it noted this is the way to fix it. [snip] Did you try gpart? -- Didi I hope I did not miss something gparted see the parttion /dev/sda7 and recognize it as lvm but nothing from there. except that I got LVM isn't yet supported. it looks like the metedata is corrupted but the actual information is there (as when you loose the the parrtion table from the mbr (446-510)) Not gparted, gpart: http://www.brzitwa.de/mb/gpart/index.html Gpart is a tool which tries to guess the primary partition table of a PC-type hard disk in case the primary partition table in sector 0 is damaged, incorrect or deleted. If you fail, and still want to resurrect specific files, you can also try MagicRescue: http://www.itu.dk/people/jobr/magicrescue/ -- Didi looks promising thank you And i was dding file by file :-( from the disk .. ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: How can I grab the filesystem from corrupted lvm (help recover data from lvm with one pv missing)
On Monday, 11 בOctober 2010 11:50:45 Boris shtrasman wrote: On Mon, Oct 11, 2010 at 11:45 AM, Yedidyah Bar-David Not gparted, gpart: http://www.brzitwa.de/mb/gpart/index.html Gpart is a tool which tries to guess the primary partition table of a PC-type hard disk in case the primary partition table in sector 0 is damaged, incorrect or deleted. If you fail, and still want to resurrect specific files, you can also try MagicRescue: http://www.itu.dk/people/jobr/magicrescue/ looks promising thank you And i was dding file by file :-( from the disk .. Just take notice that sequencial logical volume (partition) may be not sequencial on the physical volume (There's a logical extent to physical extent mapping). However, there is a good chance most/all of your partition is sequencial, especially if you created the volume group and the logical volumes when the disk was empty (e.g: during installation) without requiring a striped logical volume (it's not the default). Good luck, -- Oron Peled Voice: +972-4-8228492 o...@actcom.co.il http://users.actcom.co.il/~oron ... one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. -- Robert Firth ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il