[linux-lvm] lvm2 recovery issue
Catalin Constantin
catalin at bounce-software.com
Fri Mar 31 23:04:25 UTC 2006
Hi there,
I am using lvm2 on debian.
The lvm was build on top of 2 software raid partitions:
/dev/md2 and /dev/md3
/dev/md3 was a raid 1 partition built from
/dev/sdc1 and /dev/sdd1
The partition type is xfs. (both raids /dev/md2, /dev/md3 and lvm
storage).
Now, the problem i have.
Somehow the /dev/md3 partition got messed up (out of sync) and between
reboots the lvm partition uses alternatively either
/dev/sdc1 or /dev/sdd1
eg:
pvdisplay
Found duplicate PV VxRU9BoOAwLDxJ8yifZT2fJGEn8CeLvs: using /dev/sdd1 not /dev/sdc1
--- Physical volume ---
PV Name /dev/md2
VG Name vg
PV Size 100.50 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 25727
Free PE 0
Allocated PE 25727
PV UUID 1vtRnR-jmjP-zbgG-JZJs-1WJu-3ZyV-Vik6wH
--- Physical volume ---
PV Name /dev/sdc1
VG Name vg
PV Size 130.39 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 33381
Free PE 0
Allocated PE 33381
PV UUID VxRU9B-oOAw-LDxJ-8yif-ZT2f-JGEn-8CeLvs
The bad thing is that some files ended up on /dev/sdd1 and some others
on /dev/sdc1.
I've unmounted the storage lvm drive and tryed to do a /dev/md3
Assemble but it looks like it won't come up !
mdadm --detail /dev/md3
mdadm: md device /dev/md3 does not appear to be active.
mdadm -A /dev/md3
mdadm: no devices found for /dev/md3
mdadm -A /dev/md3 /dev/sdd1
mdadm: /dev/md3 assembled from 1 drive - need all 2 to start it (use --run to insist).
mdadm -A /dev/md3 /dev/sdd1 /dev/sdc1
mdadm: failed to add /dev/sdc1 to /dev/md3: Device or resource busy
mdadm: /dev/md3 assembled from 1 drive - need all 2 to start it (use --run to insist).
I've already did a backup of what i can mount now.
Some files are still on the "other lvm".
What i need to know are some advices from you guys of how to recover
the most of the data from the "mess" i ended up with !
Eg:
- start lvm with /dev/sdd1 and do another backup (how do i do it in
order to make the damage minimum)
- start the md3 (repair or some) and not to loose data
Anything you can come up will be highly appreciated.
Thank you for your time and sorry if the post is too big!
--
Catalin Constantin
Bounce Software
More information about the linux-lvm
mailing list