[lug] LVM and software raid

Nick Golder nrg at nirgo.net
Mon Oct 2 14:09:10 MDT 2006


I had software raid 5 configured as md0 and all was well.  I then
layered on top of this LVM and things got better.  I wanted Xen so I worked on
upgrading from a 2.6.17 kernel (debianized) to a 2.6.17-xen kernel (also
debianized) and LVM did something strange - the PV Name has changed from
/dev/md0 to /dev/sdc1 (sdc1 being a member of md0).  The best I can
tell is that somehow the new kernel enumerated the hardware differently
and that futzed up md0 and that affected LVM's PV.  But the attributes
of the PV are still correct apart from the PV Name (this info is
probably cached somewhere and is irrelevant):

--- Physical volume ---
  PV Name               /dev/sdc1
  VG Name               vg_raid
  PV Size               596.18 GB / not usable 0   
  Allocatable           yes 
  PE Size (KByte)       4096
  Total PE              152621
  Free PE               132141
  Allocated PE          20480
  PV UUID               jkHruD-mfHD-nFPJ-3W4k-DvtI-5agw-GC4FJJ

I get this anytime I start working with the PV:
Found duplicate PV jkHruDmfHDnFPJ3W4kDvtI5agwGC4FJJ: using /dev/sdc1 not
/dev/sda1

The device mapper creates /dev/mapper/vg_foo-lv_bar but fails to create
the corresponding /dev/vg_foo/lv_bar.  md0 reports to be healthy after a
resync. Trying to do anything with this volume reports a bad superblock 
and I am at a loss.

Any suggestions?

-- 
-Nick Golder



More information about the LUG mailing list