Skip to contentSkip to conversation

Help with LVM reconstruction

linux-lvm Robin Thompson 2 participants 5 messages Oct 5, 2008 – Oct 6, 2008 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi,

My system decided that it would set me a new challenge a few days ago - break its storage hardware. Basically, I have 4x750gb connected to an Adaptec 2610sa raid card. Because of 2Tb limit, this is configured into 2 RAID 5 arrays - one 2tb and the other 50gb

This is presented to my debian system as /dev/sdb and /dev/sdc. These are combined into LVM volume and thus I have (or had) my 2.1tb volume.

Anyway, one drive went, and then the power supply decided to fail as well, thereby making the raid card mark another array as failed (interestingly only 1 of the arrays as failed (it was rebuilding at the time of power failure)*

In short the data is intact, and I have found a program called RAID Reconstructor that will produce an image file of the RAID 5 arrays. This will be hopefully 2.05tb file.

I've read that I can use losetup and vgscan to create LVM from 2 image files. But i'm unsure of how to proceed with when i have only one file which is combination of both.

Anyone out there any advice or help?
Furthermore the Raid reconstructer has further software that lets me read the resultant image file (technically it can produce a virtual image as well) - the windows software states it can read ext2/3 volumes - but it can't find any in this virtual image file. But would this be the case in an image file of 2 PVs of a LVM? But i can visually inspect the data - the first few sectors in text produce what seems to be an intact LVM config "text file".

* I could still produce a DD image of the 50gb array - but i'm hesitant to do this as i'm unsure of the stability of that system.

Thanks for your help. I'm a newbie with LVM, but i'm confident with linux in general.

_________________________________________________________________
Make a mini you and download it into Windows Live Messenger
http://clk.atdmt.com/UKM/go/111354029/direct/01/

#2 lore raw

Hi Robin,

Quoted 9 lines · Robin Thompson

In short the data is intact, and I have found a program called RAID Reconstructor that will produce an image file of the RAID 5 arrays. This will be hopefully 2.05tb file.

I've read that I can use losetup and vgscan to create LVM from 2 image files. But i'm unsure of how to proceed with when i have only one file which is combination of both.

Anyone out there any advice or help?

I have used losetup few times when doing tests with LVM. Your problem is that you have 2 PVs in 1 file (if I understand it correctly). If you know the exact size in bytes of the 2tb PV, then you can use dd to skip those 2tb and copy only the last 50gb into different file. Then truncate the original to 2tb (or copy first 2tb).
Then you should have 2 files with your 2 PVs. But think of (or test) any headers that could be in the begining of those files (for example partition table and only inside partition there is PV).
But generally, it should be possible to use those files as PVs.

Signature · 1 line
  bYE, Marki
#3 lore raw

Hi, Problem is that I don't - the card will only refer to it in 2gb - but it could be actually 2tb as in 2 x 1024 x 1024 x 1024 x1024 bytes. I can extract this: ̸¶ÿ LVM2 x[5A%r0N*>  ð I ¬Zí¾ 2terabytes {id = "ApBoL0-71Q4-e0yC-JyTI-cORC-8Yd1-Wgsf3M"seqno = 1status = ["RESIZEABLE", "READ", "WRITE"]extent_size = 8192max_lv = 256max_pv = 256physical_volumes {pv0 {id = "QADZl1-asMf-PyLf-EIw1-qLkv-ZbFI-2goQUD"device = "/dev/sdb1"status = ["ALLOCATABLE"]pe_start = 384pe_count = 524286}}}# Generated by LVM2: Mon Apr 30 18:54:48 2007contents = "Text Format Volume Group"version = 1description = ""creation_host = "r" # Linux r 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686creation_time = 1177955688 # Mon Apr 30 18:54:48 2007 2terabytes {id = "ApBoL0-71Q4-e0yC-JyTI-cORC-8Yd1-Wgsf3M"seqno = 2status = ["RESIZEABLE", "READ", "WRITE"]extent_size = 8192max_lv = 256max_pv = 256physical_volumes {pv0 {id = "QADZl1-asMf-PyLf-EIw1-qLkv-ZbFI-2goQUD"device = "/dev/sdb1"status = ["ALLOCATABLE"]pe_start = 384pe_count = 524286}pv1 {id = "lT0VrQ-uAur-IlZB-htso-Ezqf-nq95-YykdbX"device = "/dev/sdc1"status = ["ALLOCATABLE"]pe_start = 384pe_count = 12225}}}# Generated by LVM2: Mon Apr 30 18:55:06 2007contents = "Text Format Volume Group"version = 1description = ""creation_host = "r" # Linux r 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686creation_time = 1177955706 # Mon Apr 30 18:55:06 2007 2terabytes {id = "ApBoL0-71Q4-e0yC-JyTI-cORC-8Yd1-Wgsf3M"seqno = 3status = ["RESIZEABLE", "READ", "WRITE"]extent_size = 8192max_lv = 256max_pv = 256physical_volumes {pv0 {id = "QADZl1-asMf-PyLf-EIw1-qLkv-ZbFI-2goQUD"device = "/dev/sdb1"status = ["ALLOCATABLE"]pe_start = 384pe_count = 524286}pv1 {id = "lT0VrQ-uAur-IlZB-htso-Ezqf-nq95-YykdbX"device = "/dev/sdc1"status = ["ALLOCATABLE"]pe_start = 384pe_count = 12225}}logical_volumes {2TBData {id = "Kki2Ar-91IF-IueI-GN62-jD6o-Yl0V-hq5Y3A"status = ["READ", "WRITE", "VISIBLE"]segment_count = 2segment1 {start_extent = 0extent_count = 524286type = "striped"stripe_count = 1 # linearstripes = ["pv0", 0]}segment2 {start_extent = 524286extent_count = 12225type = "striped"stripe_count = 1 # linearstripes = ["pv1", 0]}}}}# Generated by LVM2: Mon Apr 30 18:57:56 2007contents = "Text Format Volume Group"version = 1description = ""creation_host = "r" # Linux r2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686creation_time = 1177955876 # Mon Apr 30 18:57:56 2007 What should i expect to find on the second PV? (50gb) - there is only 800gb in the total volume - so I wouldn't expect to find any data on it, but should there be any "header information" at the start of the drive?When i seek to the 2tb byte in the virtual image file - its blank - no evidence of any data - is this normal?Robin

Quoted 1 line

Date: Sun, 5 Oct 2008 21:58:11 +0200> From: [email protected]> To: [email protected]> Subject: Re: [linux-lvm] Help with LVM reconstruction> > Hi Robin,> > Sunday, October 5, 2008, 21:09:56, Robin Thompson wrote:> > > In short the data is intact, and I have found a program called RAID> > Reconstructor that will produce an image file of the RAID 5 arrays.> > This will be hopefully 2.05tb file.> > > > I've read that I can use losetup and vgscan to create LVM from 2> > image files. But i'm unsure of how to proceed with when i have only> > one file which is combination of both.> > > > Anyone out there any advice or help?> > I have used losetup few times when doing tests with LVM. Your problem> is that you have 2 PVs in 1 file (if I understand it correctly). If> you know the exact size in bytes of the 2tb PV, then you can use dd to> skip those 2tb and copy only the last 50gb into different file. Then> truncate the original to 2tb (or copy first 2tb).> Then you should have 2 files with your 2 PVs. But think of (or test)> any headers that could be in the begining of those files (for example> partition table and only inside partition there is PV).> But generally, it should be possible to use those files as PVs.> > -- > bYE, Marki> > > _______________________________________________> linux-lvm mailing list> [email protected]> https://www.redhat.com/mailman/listinfo/linux-lvm> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Win £3000 to spend on whatever you want at Uni! Click here to WIN!
_________________________________________________________________
Get all your favourite content with the slick new MSN Toolbar - FREE
http://clk.atdmt.com/UKM/go/111354027/direct/01/

#4 lore raw

Hello,

Quoted 5 lines · Robin Thompson

Hi,

Problem is that I don't - the card will only refer to it in 2gb - but it could be actually 2tb as in 2 x 1024 x 1024 x 1024 x1024 bytes.

Quoted 8 lines

I can extract this:
physical_volumes {
pv0 {
id = "QADZl1-asMf-PyLf-EIw1-qLkv-ZbFI-2goQUD"
device = "/dev/sdb1"
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 524286

That should be enough information... But it looks like 4 TB...

PE size is 8 MB and you have 524286 PEs (Physical Extents). That's 3.99 TB (actually it's 4 TB without 16 MB - two PEs, maybe the PV header is located there - I don't remember the exact LVM structure on disk).

Signature · 1 line
  bYE, Marki
#5 lore raw

Hi,It must be 4mb per PE, as the other PV would be estimated to be 100gb, when it should be 50gb. Does anyone know what I should be looking for on the 2nd PV - is there LVM information data stored there?Robin

Quoted 1 line

Date: Sun, 5 Oct 2008 22:52:21 +0200> From: [email protected]> To: [email protected]> Subject: Re: FW: [linux-lvm] Help with LVM reconstruction> > Hello,> > Sunday, October 5, 2008, 22:47:50, Robin Thompson wrote:> > > Hi,> > > > Problem is that I don't - the card will only refer to it in 2gb -> > but it could be actually 2tb as in 2 x 1024 x 1024 x 1024 x1024 bytes.> > > > I can extract this: > > physical_volumes {> > pv0 {> > id = "QADZl1-asMf-PyLf-EIw1-qLkv-ZbFI-2goQUD"> > device = "/dev/sdb1"> > status = ["ALLOCATABLE"]> > pe_start = 384> > pe_count = 524286> > That should be enough information... But it looks like 4 TB...> > PE size is 8 MB and you have 524286 PEs (Physical Extents). That's> 3.99 TB (actually it's 4 TB without 16 MB - two PEs, maybe the PV> header is located there - I don't remember the exact LVM structure> on disk).> > -- > bYE, Marki> > > _______________________________________________> linux-lvm mailing list> [email protected]> https://www.redhat.com/mailman/listinfo/linux-lvm> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

_________________________________________________________________
Make a mini you and download it into Windows Live Messenger
http://clk.atdmt.com/UKM/go/111354029/direct/01/