# LVM and Raid catastrophe.

## seratne

I rebooted my linux server and upon reboot one of my disks was missing, which caused all sorts of errors with my md devices and lvm. I was able to get the lvm back up and running by setting the one disk as missing in the mdadm.conf file, but I wanted the missing disk to actually show up so that my raid1 wouldn't be degraded. A simple kernel upgrade fixed the problem, but all sorts of new problems showed up. 

Where I'm at now is that md0 (2x1TB drives sdc1 and sdd1) and the md1 (2x2TB drives sdb1 and sde1) are back and added back into the lvm as physical volumes volume group and logical volumes are there. But in Webmin they're displaying the wrong size. And I'm unable to mount the logical volume with an uknown filesystem error. 

In Webmin the file sizes are displayed incorrectly:

vg0 2.73kB

md0 931.51kB    md1 1.82kB

lv0 2.73GB

```
  --- Logical volume ---

  LV Name                /dev/vg0/lv0

  VG Name                vg0

  LV UUID                9tvaWR-ES1I-BE7N-t3Kb-a9Th-hAYX-gxQv9D

  LV Write Access        read/write

  LV Status              available

  # open                 0

  LV Size                2.73 TiB

  Current LE             715264

  Segments               2

  Allocation             inherit

  Read ahead sectors     auto

  - currently set to     256

  Block device           253:0

```

```
  --- Physical volume ---

  PV Name               /dev/md0

  VG Name               vg0

  PV Size               931.51 GiB / not usable 3.12 MiB

  Allocatable           yes

  PE Size               4.00 MiB

  Total PE              238466

  Free PE               133

  Allocated PE          238333

  PV UUID               AXut7k-0Wsi-Wz3b-9sA3-tdel-2SOV-hYxKnA

  --- Physical volume ---

  PV Name               /dev/md1

  VG Name               vg0

  PV Size               1.82 TiB / not usable 2.50 MiB

  Allocatable           yes (but full)

  PE Size               4.00 MiB

  Total PE              476931

  Free PE               0

  Allocated PE          476931

  PV UUID               8RBEU8-2kkO-eTxi-muZJ-SWvc-Rs3i-ZzKSOl
```

```
  --- Volume group ---

  VG Name               vgcore

  System ID

  Format                lvm2

  Metadata Areas        2

  Metadata Sequence No  4

  VG Access             read/write

  VG Status             resizable

  MAX LV                0

  Cur LV                1

  Open LV               0

  Max PV                0

  Cur PV                2

  Act PV                2

  VG Size               2.73 TiB

  PE Size               4.00 MiB

  Total PE              715397

  Alloc PE / Size       715264 / 2.73 TiB

  Free  PE / Size       133 / 532.00 MiB

  VG UUID               8cCdkE-C4YY-rJE7-BpPb-2hnc-sNM7-jKJyMV

```

And here's the error message when I try to mount

```

mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg0-lv0,

       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

```

Any help is greatly appreciated

----------

## richard.scott

Try and set your kernel boot args to use /dev/vg0/lv0 rather than the /dev/mapper one.

----------

