LVM Lost (and found)

Oh crap… We had a big storm in Auckland today and the ensuing power cut seem to have fried my spanned drive on the Debian box. When power was restored, the drive didn’t come back up, the mount is gone and with it all my recorded media!

Apologies for the weird weird formatting – but something is happenning with my code tags which I don’t understand…
Right, so – off to Google we go and first things first I needed to do some background digging to see what we/I could (see) so:

#pvdisplay

Couldn't find device with uuid 'K7SVIa-2LQ6-wVDk-pi0f-EZuq-MbYp-mU4z37'.

--- Physical volume ---
PV Name unknown device
VG Name disk_span
PV Size 186.31 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 47695
Free PE 0
Allocated PE 47695
PV UUID K7SVIa-2LQ6-wVDk-pi0f-EZuq-MbYp-mU4z37

— Physical volume —
PV Name /dev/hdc
VG Name disk_span
PV Size 111.79 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 28618
Free PE 0
Allocated PE 28618
PV UUID Lx7gjN-OfaC-FG6S-uXH4-MgwN-jldC-jUkZ3j

— Physical volume —
PV Name /dev/hdd
VG Name disk_span
PV Size 186.31 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 47695
Free PE 0
Allocated PE 47695
PV UUID FbgvFq-NFZM-uzQO-b8ME-ce7p-VtHU-7gO9WM
# vgscan
Reading all physical volumes. This may take a while...
Couldn't find device with uuid 'K7SVIa-2LQ6-wVDk-pi0f-EZuq-MbYp-mU4z37'.
Couldn't find all physical volumes for volume group disk_span.
Couldn't find device with uuid 'K7SVIa-2LQ6-wVDk-pi0f-EZuq-MbYp-mU4z37'.
Couldn't find all physical volumes for volume group disk_span.
Volume group "disk_span" not found
Now, Google being the good friend that it is, I’ve found a few references to similar situations, but – given my lack of confidence in dealing with the down and dirties of Debian, I’m somewhat reluctant to start pasting in commands which could fry the spanned drive (if indeed it is still intact)
I see from the list of devices above, that my recently added /dev/hdb drive doesn’t seem to be visible, it’s been suggested that I (well a person with a similar problem) try the following command.

# pvdisplay /dev/hdb
--- Physical volume ---
PV Name /dev/hdb
VG Name disk_span
PV Size 186.31 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 47695
Free PE 0
Allocated PE 47695
PV UUID K7SVIa-2LQ6-wVDk-pi0f-EZuq-MbYp-mU4z37
# pvdisplay
--- Physical volume ---
PV Name /dev/hdb
VG Name disk_span
PV Size 186.31 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 47695
Free PE 0
Allocated PE 47695
PV UUID K7SVIa-2LQ6-wVDk-pi0f-EZuq-MbYp-mU4z37
— Physical volume —
PV Name /dev/hdc
VG Name disk_span
PV Size 111.79 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 28618
Free PE 0
Allocated PE 28618
PV UUID Lx7gjN-OfaC-FG6S-uXH4-MgwN-jldC-jUkZ3j

— Physical volume —
PV Name /dev/hdd
VG Name disk_span
PV Size 186.31 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 47695
Free PE 0
Allocated PE 47695
PV UUID FbgvFq-NFZM-uzQO-b8ME-ce7p-VtHU-7gO9WM
Okies, so – good things and happy Linux pixies, it appears to have re associated something with something else which is just super � let’s have a look at what vgdisplay gives us:# vgdisplay
--- Volume group ---
VG Name disk_span
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 3
Act PV 3
VG Size 484.41 GB
PE Size 4.00 MB
Total PE 124008
Alloc PE / Size 124008 / 484.41 GB
Free PE / Size 0 / 0
VG UUID lRCozx-Q1Mi-pIAe-6GtO-AsXy-Jjgh-1loFtc

But NOW what? (and *WHAT* is happenning with the formatting in here?!)
To recap the commands I’ve used are: vgscan
vgdisplay
pvdisplay /dev/hdb
pvdisplay
vgdisplay
So… now it’s working(ish) but the logical volume is marked not avalible so we need to: lvchange -a y /dev/disk_span/lvol0
lvdisplay -m
Yay, it’s avalible now, remount the drive and check it’s contents…mount -t ext3 /dev/disk_span/lvol0 /mnt
ls mnt
cd /mnt
ls -al>
cd MediaStore/

Hurrah, all contents present and accounted for – massive amounts of thanks to my collegue Simon who donated 5 minutes of his time to figure this avalibilty tag stuff out for me (it pays to know people who are very very smart, thay’re just so much more efficient at this than I am!