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.
(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.
"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.
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.