View Single Post
  #1  
Old 7th June 2012, 20:45
Bitsofme Bitsofme is offline
Junior Member
 
Join Date: Jun 2012
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default Restore lvm after destroying boot disk

Hi All,

I need to restore my lvm after destroying my boot disk during an upgrade.

I have used the information on this http://www.howtoforge.com/recover_da...lvm_partitions
as a starting point and have got so far but got stuck.

I do not have a raid just three disks linked into a volume group so I skipped the first part and started at the Recovering The LVM Setup section.

I used the dd command (also piped the output into strings to clean it up) and created this config file
Code:
# Generated by LVM2 version 2.02.95(2) (2012-03-06): Mon Jun  4 17:01:30 2012

contents = "Text Format Volume Group"
version = 1

description = ""

creation_host = "(none)"	# Linux (none) 3.3.4-5.fc17.x86_64 #1 SMP Mon May 7 17:29:34 UTC 2012 x86_64
creation_time = 1338829290	# Mon Jun  4 17:01:30 2012

vg_big {
	id = "OBZT6E-tzAO-v80A-kN38-R1Uo-3GRI-dXd4wj"
	seqno = 13
	format = "lvm2" # informational
	status = ["RESIZEABLE", "READ", "WRITE"]
	flags = []
	extent_size = 8192
	max_lv = 256
	max_pv = 256
	metadata_copies = 0

	physical_volumes {

		pv0 {
			id = "PCNHHY-LSvJ-jKbt-TXbN-tceZ-0GPe-tshRED"
			device = "/dev/sdb"

			status = ["ALLOCATABLE"]
			flags = []
			dev_size = 3907029168
			pe_start = 384
			pe_count = 476932
		}

		pv1 {
			id = "h8j1UC-Uckf-Ob3w-UTea-nUfT-JPWc-sVdjeF"
			device = "/dev/sdc"

			status = ["ALLOCATABLE"]
			flags = []
			dev_size = 3907029168
			pe_start = 384
			pe_count = 476932
		}

		pv2 {
			id = "Ixsun3-rGKx-0xWB-tqFK-RDYq-OuNR-qIj5sO"
			device = "/dev/sda"

			status = ["ALLOCATABLE"]
			flags = []
			dev_size = 3907029168
			pe_start = 2048
			pe_count = 476932
		}
	}

	logical_volumes {

		big	{
			id = "ptLLIA-nQhQ-JsBQ-wur0-fejd-wV4E-Xj1PyR"
			status = ["READ", "WRITE", "VISIBLE"]
			flags = []
			segment_count = 1

			segment1 {
				start_extent = 0
				extent_count = 953864

				type = "striped"
				stripe_count = 1
				stripe_size = 8

				stripes = [
					"pv0", 0,
					"pv2", 0
				]
			}
		}
	}
}
In the stripes part it lists only two pv's PV0 and PV2 is this correct?

I tried vgconfigrestore with the -t for test and got

Test mode: Metadata will NOT be updated and volumes will not be (de)activated.
Couldn't find device with uuid PCNHHY-LSvJ-jKbt-TXbN-tceZ-0GPe-tshRED.
Couldn't find device with uuid Ixsun3-rGKx-0xWB-tqFK-RDYq-OuNR-qIj5sO.
Segment with extent 953864 in PV unknown device not found
Couldn't read all logical volumes for volume group vg_big.
Restore failed.

I am guessing that I need to assign uuids to the disks to match the old config?

Any ideas?

Thanks

I have attached the output from the dd command after it has been cleaned with strings
Attached Files
File Type: gz sdctext.txt.gz (1.8 KB, 109 views)
Reply With Quote
Sponsored Links