6

Following some disk errors while I was moving some extents, I now have a hidden locked [pvmove0] which doesn't seem to have any physical extents assigned, although it is 4Mb long!

# lvs -a -o+seg_pe_ranges a/pvmove0
  LV        VG   Attr       LSize Pool Origin Data%  Move Log Cpy%Sync Convert PE Ranges
  [pvmove0] a    vwC---v--- 4.00m

I've had this happen a couple of years ago on a different system (see here) but didn't get many replies (only 1) and can't remember how/if I fixed it.

The simple lvremove a/pvmove0' (optionally with --force) results in the message Can't remove locked LV pvmove0.

pvmove --abort does nothing. The presence of this volume doesn't seem to affect other moves (which simply use [pvmove1]).

In the config, the LV shows:

            pvmove0 {
                    id = "54veYD-hM8r-j214-MOD1-FGnV-3g7t-jRlZ7W"
                    status = ["READ", "WRITE", "LOCKED"]
                    flags = []
                    creation_host = "zotac"
                    creation_time = 1394764593      # 2014-03-14 02:36:33 +0000
                    allocation_policy = "contiguous"
                    segment_count = 1

                    segment1 {
                            start_extent = 0
                            extent_count = 1        # 4 Megabytes

                            type = "error"
                    }
            }

I noticed there's no physical volume associate with the LV.

My enquiry a few years ago got the suggestion to try dmsetup remove. Unfortunately, this requires a device name and dmsetup info a-pvmove0 reports that the Device does not exist.

I suspect that the only fix is to manually edit the config file to remove the offending LV and then use vgcfgrestore but would assume that I'm not the only person to have this problem and would think there's a series of commands to fix it!

[FYI: the disk errors were the almost simultaneous failure of 2 out of 3 disks in a RAID array; fortunately one the drives only had a few bad blocks so I was able to recover all but a few megabytes of a 500Gb volume using ddrescue]

2 Answers 2

5

OK, I gave up waiting for answers and tried the simple solution of editing the config file. that is:

  1. vgcfgbackup a
  2. Edit /etc/lvm/backup/a and remove the definition of Logical Volume pvmove0
  3. vgcfgrestore a

The volume disappeared and there don't seem to be any side-effects.

1

I had a similar issue with power going out during a pvmove. Reissuing the command made the process resume without issues.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .