Results 1 to 3 of 3
I had to reinstall, I have two raid 5 arrays. both belonging to /dev/vg01 and only 1 lvol in vg00 using 100% of the extents in vg01. after my reinstall ...
- 03-10-2009 #1Just Joined!
- Join Date
- Mar 2009
- Posts
- 2
LVM screw up after reinstall
I had to reinstall, I have two raid 5 arrays. both belonging to /dev/vg01 and only 1 lvol in vg00 using 100% of the extents in vg01. after my reinstall I screwed up and did ---
vgcreate /dev/vg01 /dev/md0 /dev/md1
not sure what i was thinking, but now i have a vg with no lvols and almost 5TB free - not good being that it was only about 15% free prior to the reinstall.
ANY IDEAS on how I can get me lvol back would be much appreciated.
BTW I dont have a vg01 backup conf to do a vgcfgrestore either.
I was in the process of backing up my system when my root disk failed ( only
2 months old )
/home and /usr are the only things did get backed up.
i know vg config files are in /etc/lvm is there a chance there is anything in
/usr that might help.
if I had /etc i could get the conf files and do a vgcfgrestore and be in good
shape from there.
There has to be a way to rebuild / repair / recover the VGDRA on the disk.
the data isnt lost, just vgdra is now hosed.
can a conf file be made that i could use for vgcfgrestore.
When I created the VG orginally it was on /dev/md0 and used 100% of it.
I only had 1 lvol
my conf is below - there has to be a way to add the lvol info to it, then i
could just run vgcfgrestore with it.
I know 100% for a
fact I had only one lvol and 0 extents free and /dev/md0 was first then I
extended it to /dev/md1
I then created /dev/md1 and added it to the vg, then did an lvextend of the
single lvol to use all of /dev/md1
my conf is below - there has to be a way to add the lvol info to it, then i
could just run vgcfgrestore with it.
oh it was named vg01 not vg00 like I originally thought. I know 100% for a
fact I had only one lvol and 0 extents free and /dev/md0 was first then I
extended it to /dev/md1
VG01 - conf from /etc/lvm
************************************************** ************************************************
vg01 {
id = "QEP01n-L126-S1O0-uG7g-VG7e-6bcj-659BSp"
seqno = 5
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 8192 # 4 Megabytes
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "j4QXUb-k9If-j4d7-AvcC-TNci-PP1L-ehrBSb"
device = "/dev/md0" # Hint only
status = ["ALLOCATABLE"]
dev_size = 5860575232 # 2.72904 Terabytes
pe_start = 384
pe_count = 715402 # 2.72904 Terabytes
}
pv1 {
id = "mQBORI-8s20-8YU8-1SLH-gQlp-W8T7-5z2PBj"
device = "/dev/md1" # Hint only
status = ["ALLOCATABLE"]
dev_size = 2930287616 # 1.36452 Terabytes
pe_start = 384
pe_count = 357701 # 1.36452 Terabytes
}
}
}
vgdisplay
************************************************** *************************************
--- Volume group ---
VG Name vg01
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 4.09 TB
PE Size 4.00 MB
Total PE 1073103
Alloc PE / Size 0 / 0
Free PE / Size 1073103 / 4.09 TB
VG UUID QEP01n-L126-S1O0-uG7g-VG7e-6bcj-659BSp
--- Physical volumes ---
PV Name /dev/md0
PV UUID j4QXUb-k9If-j4d7-AvcC-TNci-PP1L-ehrBSb
PV Status allocatable
Total PE / Free PE 715402 / 715402
PV Name /dev/md1
PV UUID mQBORI-8s20-8YU8-1SLH-gQlp-W8T7-5z2PBj
PV Status allocatable
Total PE / Free PE 357701 / 357701
mdadm --detail
************************************************** ***********************************
/dev/md0:
Version : 00.90
Creation Time : Sat Nov 29 21:00:52 2008
Raid Level : raid5
Array Size : 2930287616 (2794.54 GiB 3000.61 GB)
Used Dev Size : 732571904 (698.64 GiB 750.15 GB)
Raid Devices : 5
Total Devices : 5
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Sun Mar 8 08:21:15 2009
State : clean, degraded, recovering
Active Devices : 4
Working Devices : 5
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 128K
Rebuild Status : 5% complete
UUID : 3050bb1d:91487ea1:34176548:5e7dfa22
Events : 0.184832
Number Major Minor RaidDevice State
0 8 49 0 active sync /dev/sdd1
1 8 65 1 active sync /dev/sde1
5 8 97 2 spare rebuilding /dev/sdg1
3 8 113 3 active sync /dev/sdh1
4 8 129 4 active sync /dev/sdi1
***********************************
/dev/md1:
Version : 00.90
Creation Time : Tue Dec 2 22:17:46 2008
Raid Level : raid5
Array Size : 1465143808 (1397.27 GiB 1500.31 GB)
Used Dev Size : 732571904 (698.64 GiB 750.15 GB)
Raid Devices : 3
Total Devices : 3
Preferred Minor : 1
Persistence : Superblock is persistent
Update Time : Sun Mar 8 08:21:16 2009
State : clean, degraded, recovering
Active Devices : 2
Working Devices : 3
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 128K
Rebuild Status : 5% complete
UUID : 5204749f:ac69a42d:3be6fec9:81f51aec
Events : 0.124888
Number Major Minor RaidDevice State
0 8 81 0 active sync /dev/sdf1
1 8 145 1 active sync /dev/sdj1
3 8 161 2 spare rebuilding /dev/sdk1
Those who think Windows is the answer -
Dont understand the question
- 03-11-2009 #2
You havnt created the logical volume
to create it, command is lvcreate
(<size>=size i.e. 100G)(<name>=name of lv)# lvcreate -L <size> -n <name> vg01
then format /dev/vgo01/<name>
with filesystem
- 03-11-2009 #3Just Joined!
- Join Date
- Mar 2009
- Posts
- 2
If I did that I would not be able to get my data back - please read the entire msg before replying


Reply With Quote
