[linux-lvm] Problems after OS switch

Chris coderight at gmail.com
Sat Jan 14 03:45:09 UTC 2006


I'm not exactly sure what happened but it went something like this:

I was running unstable Debian and switched to Ubuntu.  I had a volume group
made up of 4 drives in linear append mode.  I believe the Ubuntu installer
wrote a partion table to one of the drives in the array, or possibly wrote
grub on the drive.  Anyway, after install one of the physical volumes shows
as "unknown device" and none of the other commands could find some
uuid-XXX.  I attemped to correct this by using "pvcreate -u [the_old_uuid]
-Z n" which seemed to bring the drive back into the volume group.

The problem now is that none of the volume group devices actually work.  I
have devices at /dev/mapper/vg-xxxx that I can't read from (obviously mount
doesn't work either).

Any ideas on what is going on?  Thanks for any help.  Is the volume group
lost forever?

One thing I don't understand is the "Error" when I do dmsetup:

# dmsetup status
lvm2|vg|data: 0 490209280 linear
lvm2|vg|data: 490209280 220004352 linear
lvm2|vg|data: 710213632 234422272 linear
lvm2|vg|data: 944635904 490209280 linear
hdh2: 0 230516685 linear
vg-data:
hdh1: 0 3919797 linear
Error|lvm2|vg|pv3: 0 490209664 error
vg-var:
lvm2|vg|var: 0 10485760 linear

# pvdisplay
  --- Physical volume ---
  PV Name               /dev/hdh2
  VG Name               vg
  PV Size               109.91 GB / not usable 0
  Allocatable           yes (but full)
  PE Size (KByte)       32768
  Total PE              3517
  Free PE               0
  Allocated PE          3517
  PV UUID               ZytKG3-bMMZ-x69a-sPZW-sREN-YsZI-200XM0

  --- Physical volume ---
  PV Name               /dev/hdg
  VG Name               vg
  PV Size               111.78 GB / not usable 0
  Allocatable           yes (but full)
  PE Size (KByte)       32768
  Total PE              3577
  Free PE               0
  Allocated PE          3577
  PV UUID               m0JKRA-7qZ5-6pya-gJVE-CBS2-MlMU-7O6ICX

  --- Physical volume ---
  PV Name               /dev/hde
  VG Name               vg
  PV Size               233.75 GB / not usable 0
  Allocatable           yes (but full)
  PE Size (KByte)       32768
  Total PE              7480
  Free PE               0
  Allocated PE          7480
  PV UUID               MIVulr-lAOu-pERm-kMTi-DYl1-LxOt-gF7wUT

  --- Physical volume ---
  PV Name               /dev/hdf
  VG Name               vg
  PV Size               233.75 GB / not usable 0
  Allocatable           yes (but full)
  PE Size (KByte)       32768
  Total PE              7480
  Free PE               0
  Allocated PE          7480
  PV UUID               9vOuxO-FoXv-2qFQ-KAef-eWOo-tg0q-zUdB66

# pvscan
  PV /dev/hdh2   VG vg   lvm2 [109.91 GB / 0    free]
  PV /dev/hdg    VG vg   lvm2 [111.78 GB / 0    free]
  PV /dev/hde    VG vg   lvm2 [233.75 GB / 0    free]
  PV /dev/hdf    VG vg   lvm2 [233.75 GB / 0    free]
  Total: 4 [689.19 GB] / in use: 4 [689.19 GB] / in no VG: 0 [0   ]

# lvdisplay
  --- Logical volume ---
  LV Name                /dev/vg/var
  VG Name                vg
  LV UUID                Q7gaTE-ZROt-aTML-UlxU-J0uh-Ecnu-5RmVVO
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                5.00 GB
  Current LE             160
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/vg/data
  VG Name                vg
  LV UUID                soHvwL-1e9K-9CMC-RtyP-qEwo-tbfu-5UwYFo
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                684.19 GB
  Current LE             21894
  Segments               4
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:1

# lvscan
  ACTIVE            '/dev/vg/var' [5.00 GB] inherit
  ACTIVE            '/dev/vg/data' [684.19 GB] inherit

# vgdisplay
  --- Volume group ---
  VG Name               vg
  System ID
  Format                lvm2
  Metadata Areas        3
  Metadata Sequence No  19
  VG Access             read/write
  VG Status             resizable
  MAX LV                255
  Cur LV                2
  Open LV               0
  Max PV                255
  Cur PV                4
  Act PV                4
  VG Size               689.19 GB
  PE Size               32.00 MB
  Total PE              22054
  Alloc PE / Size       22054 / 689.19 GB
  Free  PE / Size       0 / 0
  VG UUID               1aPbjm-Prhr-UBQb-SMpd-4zlO-7gSy-fLg5FA

# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "vg" using metadata type lvm2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20060113/e4f14267/attachment.htm>


More information about the linux-lvm mailing list