Skip to contentSkip to conversation

lvm1 to lvm2 upgrade failed: confused on pv between sda1 and md5

linux-lvm Marc MERLIN 2 participants 4 messages Dec 12, 2005 – Dec 13, 2005

lore
Share & tools
lore
#0 lore raw

The VG is seen, but not the one LV in there

kernel: 2.6.14
LVM version: 2.01.04 (2005-02-09)
Library version: 1.01.00-ioctl (2005-01-17)
Driver version: 4.4.0

My PV for /dev/dshelf3 is /dev/md5
The VG is found, but not the LV within it, apparently because LVM selects /dev/sda1 instead of /dev/md5.

Sure enough, that drive is part of the raid set:

gargamel:~# cat /proc/mdstat | grep sda1
md5 : active raid5 sdg1[6] sdf1[5] sde1[4] sdd1[3] sdc1[2] sdb1[1] sda1[0]

vgdisplay -vv (abbridged) gives:
/dev/sda1: lvm1 label detected
/dev/md2: lvm1 label detected
/dev/md4: lvm2 label detected
/dev/md5: lvm1 label detected
Duplicate PV 9O6xt9OyES075HwBQHdtmGRb7vD4EOy8 on /dev/sda1 - using md /dev/md5 /dev/sdt1: lvm2 label detected
Ignoring duplicate PV ROSSavso6qtpjO7fw93bO7cMntbJ09xz on /dev/sdt1 - using md /dev/md4 /dev/sdh3: lvm1 label detected
Ignoring duplicate PV LpvPCRIdjGlQuX4FCWWArPhv7Vv3Cv08 on /dev/sdh3 - using md /dev/md2 /dev/sdl3: lvm1 label detected
Ignoring duplicate PV LpvPCRIdjGlQuX4FCWWArPhv7Vv3Cv08 on /dev/sdl3 - using md /dev/md2

Found /dev/sda1 in VG dshelf3
Unlocking /var/lock/lvm/V_dshelf3
--- Volume group ---

  VG Name               dshelf3
  System ID             gargamel.svh.merlins.org1013790828
  Format                lvm1
  VG Access             read/write
  VG Status             resizable
  MAX LV                255
  Cur LV                0
  Open LV               0
  Max PV                255
  Cur PV                1
  Act PV                1
  VG Size               410.06 GB
  PE Size               64.00 MB
  Total PE              6561
  Alloc PE / Size       6400 / 400.00 GB
  Free  PE / Size       161 / 10.06 GB
  VG UUID               6j8wL4-3n1y-WHL3-HM61-IyuS-6vJW-pubTQo

--- Physical volumes ---

  PV Name               /dev/sda1     
  PV UUID               9O6xt9-OyES-075H-wBQH-dtmG-Rb7v-D4EOy8
  PV Status             allocatable
  Total PE / Free PE    6561 / 161
gargamel:~# vgchange -a y dshelf3
  0 logical volume(s) in volume group "dshelf3" now active

Can I help LVM2 find the LV in there somehow?

BTW, note that LVM2 did say "using md /dev/md5 (instead of /dev/sda1) and still showed /dev/sda1 as a PV for dshelf3 instead

Thanks
Marc

Signature · 4 lines
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/   |   Finger [email protected] for PGP key
#1 lore raw

Hi Marc,

Quoted 1 line · Marc MERLIN

LVM version: 2.01.04 (2005-02-09)

There have been many bug fixes since that release.

First of all, try the last 2.01.* release (2.01.15) and see whether that fixes it.

Quoted 1 line

Library version: 1.01.00-ioctl (2005-01-17)

Also suggest updating device-mapper to 1.01.05.

Check that you have in lvm.conf devices section:
md_component_detection = 1
(i.e. not = 0)

If you edit lvm.conf, run 'vgscan' afterwards.

If things still don't work, check your metadata backups and archives in /etc/lvm and see if they show the LV disappearing. If you want me to investigate, tar up that directory and email it to me.

Alasdair

Signature · 1 line
[email protected]
#2 lore raw
Quoted 10 lines · Alasdair G Kergon

Hi Marc,

Quoted 1 line · Marc MERLIN

LVM version: 2.01.04 (2005-02-09)

There have been many bug fixes since that release.

First of all, try the last 2.01.* release (2.01.15) and see whether that fixes it.

Quoted 7 lines
Quoted 1 line

Library version: 1.01.00-ioctl (2005-01-17)

Also suggest updating device-mapper to 1.01.05.

Check that you have in lvm.conf devices section:
md_component_detection = 1
(i.e. not = 0)

That was the one, thank you so much.
For some reason, the debian package I got had this set to 0 by default

Ideally, I would have known about this file, but I didn't realize it appeared between lvm1 and lvm2

Thanks for your help (the VG is indeed up and happy now)

Marc

Signature · 4 lines
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/   |   Finger [email protected] for PGP key
#3 lore raw
Quoted 2 lines · Marc MERLIN

That was the one, thank you so much.
For some reason, the debian package I got had this set to 0 by default

When it was first introduced, the md detection didn't handle some cases very well, so Debian decided to turn it off by default. The changes to handle those cases correctly were made over a year ago, but Debian still doesn't enable it.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=278180

Alasdair

Signature · 1 line
[email protected]