Bug 1427323 - pvmove does not always print 100% when user specifies -i 1 [NEEDINFO]
Summary: pvmove does not always print 100% when user specifies -i 1
Keywords:
Status: NEW
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: 2.02.167
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: ---
Assignee: LVM Team
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks: 1425882 1563827 1595334
TreeView+ depends on / blocked
 
Reported: 2017-02-27 22:10 UTC by Tony Asleson
Modified: 2023-08-10 15:41 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1563827 1595334 (view as bug list)
Environment:
Last Closed:
Embargoed:
rule-engine: lvm-technical-solution?
dlehman: needinfo? (agk)
rule-engine: lvm-test-coverage?


Attachments (Terms of Use)
Bash script used to reproduce the bug (438 bytes, application/x-shellscript)
2017-02-27 22:10 UTC, Tony Asleson
no flags Details

Description Tony Asleson 2017-02-27 22:10:45 UTC
Created attachment 1258193 [details]
Bash script used to reproduce the bug

Description of problem:

When you issue a

# pvmove /dev/sdb /dev/sdg -i 1

you occasionally get:

# pvmove /dev/sdb /dev/sdg -i 1
  /dev/sdb: Moved: 0.00%
# echo $?
0

I'm trying to differentiate between a pvmove that has completed and one that was aborted with a `pvmove --abort`.  Thus the reason I need the 100% output as pvmove exits with 0 in both cases.


Version-Release number of selected component (if applicable):
LVM version:     2.02.167(2) (2016-11-05)
Library version: 1.02.136 (2016-11-05)
Driver version:  4.35.0


How reproducible:
About 1 in 12ish

Steps to Reproduce:
I was able to reproduce this by utilizing a bash script which I have attached


Actual results:
pvmove exits while only outputting:
/dev/sdb: Moved: 0.00%


Expected results:
/dev/sdb: Moved: 100.00%


Additional info:
If you change pvmove to exit with a different exit code when it gets aborted I wouldn't require the output to be perfect.

Comment 1 Ondrej Kozina 2017-02-28 21:36:05 UTC
This sounds like a bug. Just to verify my blurry idea of what might went wrong: did you run it on a system with lvmpold enabled?

Comment 2 Tony Asleson 2017-03-01 13:31:16 UTC
(In reply to Ondrej Kozina from comment #1)
> This sounds like a bug. Just to verify my blurry idea of what might went
> wrong: did you run it on a system with lvmpold enabled?

Default configuration of F25, lvmpolld was enabled and running.

Comment 4 David Teigland 2018-12-17 15:55:03 UTC
"pvmove A B" moves all the PEs from A to B.  Before it begins there will be N PE's on A ("pvs -o used A"), and afteward there will be 0.  I think that the best way to check the result of this command is to see if there are 0 PEs on A (using pvs) after pvmove is done.


Note You need to log in before you can comment on or make changes to this bug.