Skip to contentSkip to conversation

Internal error: Referenced LV pvmove0 not listed in VG

linux-lvm Anssi Hannula 2 participants 4 messages Apr 23, 2019 – Apr 24, 2019

lore
Share & tools
lore
#0 lore raw

Hi all,

I'm getting the following error when trying to run a pvmove command:

# pvmove -v /dev/md0:18122768-19076597
    Cluster mirror log daemon not included in build.
    Archiving volume group "delta" metadata (seqno 72).
    Creating logical volume pvmove0
    activation/volume_list configuration setting not defined: Checking 
only host tags for delta/home_r.
    Moving 167398 extents of logical volume delta/home_r.
    activation/volume_list configuration setting not defined: Checking 
only host tags for delta/data_r.
  Internal error: Referenced LV pvmove0 not listed in VG delta.

This is with git master, but I see the same on 2.02.177.

The PV in question looks like following:

# pvdisplay /dev/md0 -m
  --- Physical volume ---
  PV Name               /dev/md0
  VG Name               delta
  PV Size               72,77 TiB / not usable 3,38 MiB
  Allocatable           yes (but full)
  PE Size               4,00 MiB
  Total PE              19076598
  Free PE               0
  Allocated PE          19076598
  PV UUID               P4jDYr-BjDD-3EPk-AMhp-JC1F-1fi2-DecHRl

--- Physical Segments ---
Physical extent 0 to 655359:
Logical volume /dev/delta/home_r
Logical extents 0 to 655359
Physical extent 655360 to 917503:
Logical volume /dev/delta/data_r
Logical extents 16120362 to 16382505
Physical extent 917504 to 17037865:
Logical volume /dev/delta/data_r
Logical extents 0 to 16120361
Physical extent 17037866 to 17431081:
Logical volume /dev/delta/home_r
Logical extents 655360 to 1048575
Physical extent 17431082 to 18909199:
Logical volume /dev/delta/data_r
Logical extents 16382506 to 17860623
Physical extent 18909200 to 19076597:
Logical volume /dev/delta/home_r
Logical extents 1048576 to 1215973

Full log: http://onse.fi/pvmove/delta-pvmove.txt

vgcfgbackup: http://onse.fi/pvmove/delta-backup.txt

Signature · 1 line
Anssi Hannula
#1 lore raw

Anssi Hannula kirjoitti 2019-04-24 02:06:

Quoted 15 lines

Hi all,

I'm getting the following error when trying to run a pvmove command:

# pvmove -v /dev/md0:18122768-19076597
    Cluster mirror log daemon not included in build.
    Archiving volume group "delta" metadata (seqno 72).
    Creating logical volume pvmove0
    activation/volume_list configuration setting not defined: Checking
only host tags for delta/home_r.
    Moving 167398 extents of logical volume delta/home_r.
    activation/volume_list configuration setting not defined: Checking
only host tags for delta/data_r.
  Internal error: Referenced LV pvmove0 not listed in VG delta.
Quoted 1 line

This is with git master, but I see the same on 2.02.177.

[...]

Here is a short reproducer:

------clip------
#!/bin/sh

set -ex

mkdir -p lvmtestdir
mount -t tmpfs none lvmtestdir
cd lvmtestdir

truncate --size=$((156275497728*512)) testimg1
truncate --size=$((46883372928*512)) testimg2

dev1="$(losetup -f --show testimg1)"
dev2="$(losetup -f --show testimg2)"

pvcreate "$dev1"
pvcreate "$dev2"

vgcreate TESTVG "$dev1" "$dev2"

lvcreate --name=lv0 -l $((1048576+167398)) TESTVG \
	"$dev1":0+655360 \
	"$dev1":17037866+393216 \
	"$dev1":18909200+167398
lvcreate --name=lv1 -l $((16382506+1478118)) TESTVG \
	"$dev1":917504+16120362 \
	"$dev1":655360+262144 \
	"$dev1":17431082+1478118

# ERROR
pvmove -v "$dev1":18122768-19076597 || :

# cleanup
vgremove --force TESTVG
losetup -d "$dev1"
losetup -d "$dev2"
cd ..
sleep 1 # lvmtestdir busy?
umount lvmtestdir
------clip------
Signature · 1 line
Anssi Hannula
#2 lore raw
Quoted 17 lines · Anssi Hannula

Anssi Hannula kirjoitti 2019-04-24 02:06:

Quoted 16 lines

Hi all,

I'm getting the following error when trying to run a pvmove command:

# pvmove -v /dev/md0:18122768-19076597
    Cluster mirror log daemon not included in build.
    Archiving volume group "delta" metadata (seqno 72).
    Creating logical volume pvmove0
    activation/volume_list configuration setting not defined: Checking
only host tags for delta/home_r.
    Moving 167398 extents of logical volume delta/home_r.
    activation/volume_list configuration setting not defined: Checking
only host tags for delta/data_r.
  Internal error: Referenced LV pvmove0 not listed in VG delta.

This is with git master, but I see the same on 2.02.177.

This old comment stands out as possibly related:

/* FIXME Cope with non-contiguous => splitting existing segments */

https://sourceware.org/git/?p=lvm2.git;a=blob;f=tools/pvmove.c;h=c5e39292228393d6d2ce0a21018dba5b5c306da5;hb=HEAD#l342

It seems you're trying to pvmove a range that covers two segments, which I guess doesn't work (I don't know why it doesn't check for this to provide a better error.) If you pvmove segments separately it should avoid that limitation (your test works for me if I do "pvmove /dev/loop0:18122768-18909199" which avoids crossing a segment boundary.)

Quoted 52 lines

Here is a short reproducer:

------clip------
#!/bin/sh

set -ex

mkdir -p lvmtestdir
mount -t tmpfs none lvmtestdir
cd lvmtestdir

truncate --size=$((156275497728*512)) testimg1
truncate --size=$((46883372928*512)) testimg2

dev1="$(losetup -f --show testimg1)"
dev2="$(losetup -f --show testimg2)"

pvcreate "$dev1"
pvcreate "$dev2"

vgcreate TESTVG "$dev1" "$dev2"

lvcreate --name=lv0 -l $((1048576+167398)) TESTVG \
	"$dev1":0+655360 \
	"$dev1":17037866+393216 \
	"$dev1":18909200+167398
lvcreate --name=lv1 -l $((16382506+1478118)) TESTVG \
	"$dev1":917504+16120362 \
	"$dev1":655360+262144 \
	"$dev1":17431082+1478118

# ERROR
pvmove -v "$dev1":18122768-19076597 || :

# cleanup
vgremove --force TESTVG
losetup -d "$dev1"
losetup -d "$dev2"
cd ..
sleep 1 # lvmtestdir busy?
umount lvmtestdir
------clip------
Signature · 7 lines
Anssi Hannula

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
#3 lore raw

David Teigland kirjoitti 2019-04-24 21:05:

Quoted 23 lines · Anssi Hannula
Quoted 17 lines

Anssi Hannula kirjoitti 2019-04-24 02:06:

Quoted 16 lines

Hi all,

I'm getting the following error when trying to run a pvmove command:

# pvmove -v /dev/md0:18122768-19076597
    Cluster mirror log daemon not included in build.
    Archiving volume group "delta" metadata (seqno 72).
    Creating logical volume pvmove0
    activation/volume_list configuration setting not defined: Checking
only host tags for delta/home_r.
    Moving 167398 extents of logical volume delta/home_r.
    activation/volume_list configuration setting not defined: Checking
only host tags for delta/data_r.
  Internal error: Referenced LV pvmove0 not listed in VG delta.

This is with git master, but I see the same on 2.02.177.

This old comment stands out as possibly related:

/* FIXME Cope with non-contiguous => splitting existing segments */

Quoted 7 lines

https://sourceware.org/git/?p=lvm2.git;a=blob;f=tools/pvmove.c;h=c5e39292228393d6d2ce0a21018dba5b5c306da5;hb=HEAD#l342

It seems you're trying to pvmove a range that covers two segments, which I guess doesn't work (I don't know why it doesn't check for this to provide a better error.) If you pvmove segments separately it should avoid that limitation (your test works for me if I do "pvmove /dev/loop0:18122768-18909199" which avoids crossing a segment boundary.)

Thanks, pvmoving the segments separately seems to work around the issue (well, at least the first pvmove started fine).

Quoted 44 lines
Quoted 44 lines

Here is a short reproducer:

------clip------
#!/bin/sh

set -ex

mkdir -p lvmtestdir
mount -t tmpfs none lvmtestdir
cd lvmtestdir

truncate --size=$((156275497728*512)) testimg1
truncate --size=$((46883372928*512)) testimg2

dev1="$(losetup -f --show testimg1)"
dev2="$(losetup -f --show testimg2)"

pvcreate "$dev1"
pvcreate "$dev2"

vgcreate TESTVG "$dev1" "$dev2"

lvcreate --name=lv0 -l $((1048576+167398)) TESTVG \
	"$dev1":0+655360 \
	"$dev1":17037866+393216 \
	"$dev1":18909200+167398
lvcreate --name=lv1 -l $((16382506+1478118)) TESTVG \
	"$dev1":917504+16120362 \
	"$dev1":655360+262144 \
	"$dev1":17431082+1478118

# ERROR
pvmove -v "$dev1":18122768-19076597 || :

# cleanup
vgremove --force TESTVG
losetup -d "$dev1"
losetup -d "$dev2"
cd ..
sleep 1 # lvmtestdir busy?
umount lvmtestdir
------clip------
Signature · 1 line
Anssi Hannula