<div dir="ltr"><div>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 shown as 4Mb long.</div><div>
<br></div><div>    # lvs -a -o+seg_pe_ranges a/pvmove0</div><div>      LV        VG   Attr       LSize Pool Origin Data%  Move Log Cpy%Sync Convert PE Ranges</div><div>      [pvmove0] a    vwC---v--- 4.00m</div><div><br></div>
<div>The simple 'lvremove a/pvmove0' (optionally with '--force') results in the message 'Can't remove locked LV pvmove0'.<br></div><div><br></div><div>'pvmove --abort' does nothing. The presence of this volume doesn't seem to affect other moves (which simply use [pvmove1]).</div>
<div><br></div><div>In the config, the LV shows:</div><div><br></div><div>                pvmove0 {</div><div>                        id = "54veYD-hM8r-j214-MOD1-FGnV-3g7t-jRlZ7W"</div><div>                        status = ["READ", "WRITE", "LOCKED"]</div>
<div>                        flags = []</div><div>                        creation_host = "zotac"</div><div>                        creation_time = 1394764593      # 2014-03-14 02:36:33 +0000</div><div>                        allocation_policy = "contiguous"</div>
<div>                        segment_count = 1</div><div><br></div><div>                        segment1 {</div><div>                                start_extent = 0</div><div>                                extent_count = 1        # 4 Megabytes</div>
<div><br></div><div>                                type = "error"</div><div>                        }</div><div>                }</div><div><br></div><div>I noticed there's no physical volume associate with the LV although the extent count of 1 explains why it's reported as 4Mb in size.</div>
<div><br></div><div>I suspect that the only fix is to manually edit the config file to remove the offending LV and then use `vgcfgrestore` (or possible simply edit the config file from a rescue system) but would assume that I'm not the only person to have this problem and would think there's a series of (possibly undocumented) commands to clean this up.<br>
</div><div><br></div><div>[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']</div>
<div><br></div>-- <br>Derek.
</div>