Bug 504210 - pvmove on one PV doesn't
pvmove on one PV doesn't
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-04 15:24 EDT by Matěj Cepl
Modified: 2011-01-13 12:25 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-04 15:41:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Matěj Cepl 2009-06-04 15:24:31 EDT
Description of problem:
bradford:~# lvs -o +seg_pe_ranges
  LV           VG          Attr   LSize  Origin Snap%  Move Log Copy%  Convert PE Ranges            
  lv_fedoraOld vg_bradford -wi-a-  5,00G                                       /dev/sda2:36096-37375
  lv_home      vg_bradford -wi-ao 97,66G                                       /dev/sda2:0-24999    
  lv_nahan     vg_bradford -wi-a-  5,00G                                       /dev/sda2:33536-34815
  lv_root      vg_bradford -wi-ao 14,53G                                       /dev/sda2:25000-28719
  lv_swap      vg_bradford -wi-ao  3,81G                                       /dev/sda2:30000-30975
  lv_tikanga   vg_bradford -wi-a-  4,87G                                       /dev/sda2:30976-32221
bradford:~# pvs --segments -o +lv_name
  PV         VG          Fmt  Attr PSize   PFree  Start SSize LV          
  /dev/sda2  vg_bradford lvm2 a-   148,85G 17,98G     0 25000 lv_home     
  /dev/sda2  vg_bradford lvm2 a-   148,85G 17,98G 25000  3720 lv_root     
  /dev/sda2  vg_bradford lvm2 a-   148,85G 17,98G 28720  1280             
  /dev/sda2  vg_bradford lvm2 a-   148,85G 17,98G 30000   976 lv_swap     
  /dev/sda2  vg_bradford lvm2 a-   148,85G 17,98G 30976  1246 lv_tikanga  
  /dev/sda2  vg_bradford lvm2 a-   148,85G 17,98G 32222  1314             
  /dev/sda2  vg_bradford lvm2 a-   148,85G 17,98G 33536  1280 lv_nahan    
  /dev/sda2  vg_bradford lvm2 a-   148,85G 17,98G 34816  1280             
  /dev/sda2  vg_bradford lvm2 a-   148,85G 17,98G 36096  1280 lv_fedoraOld
  /dev/sda2  vg_bradford lvm2 a-   148,85G 17,98G 37376   730             
bradford:~# pvmove --alloc anywhere -t -v  /dev/sda2:30000-30975 /dev/sda2:28720
  Test mode: Metadata will NOT be updated.
    Finding volume group "vg_bradford"
    Test mode: Skipping archiving of volume group.
    Creating logical volume pvmove0
    Moving 976 extents of logical volume vg_bradford/lv_swap
  Insufficient free space: 976 extents needed, but only 1 available
  Unable to allocate mirror extents for pvmove0.
  Failed to convert pvmove LV to mirrored
    Test mode: Wiping internal cache
    Wiping internal VG cache
bradford:~# 


Version-Release number of selected component (if applicable):
lvm2-2.02.45-4.fc11.x86_64

How reproducible:
100%

Steps to Reproduce:
1.see above
2.
3.
  
Actual results:
no move

Expected results:
swap should be moved

Additional info:
Comment 1 Matěj Cepl 2009-06-04 15:33:09 EDT
bradford:~# pvmove --alloc anywhere -t -v  /dev/sda2:30000-30975 /dev/sda2:28720-29695
  Test mode: Metadata will NOT be updated.
    Finding volume group "vg_bradford"
    Test mode: Skipping archiving of volume group.
    Creating logical volume pvmove0
    Moving 976 extents of logical volume vg_bradford/lv_swap
    Found volume group "vg_bradford"
    Updating volume group metadata
    Test mode: Skipping volume group backup.
    Found volume group "vg_bradford"
    Found volume group "vg_bradford"
    Found volume group "vg_bradford"
    Found volume group "vg_bradford"
    Test mode: Wiping internal cache
    Wiping internal VG cache
  Command failed with status code 5.
bradford:~#
Comment 2 Alasdair Kergon 2009-06-04 15:41:47 EDT
So you spotted and corrected the error in the syntax:-)
(I think we should change the status code 5 there though.)
Comment 3 Matěj Cepl 2009-06-04 15:43:47 EDT
bradford:~# pvmove --alloc anywhere -v  /dev/sda2:30000-30975 /dev/sda2:28720-29695
    Finding volume group "vg_bradford"
    Archiving volume group "vg_bradford" metadata (seqno 12).
    Creating logical volume pvmove0
    Moving 976 extents of logical volume vg_bradford/lv_swap
    Found volume group "vg_bradford"
    Updating volume group metadata
    Creating volume group backup "/etc/lvm/backup/vg_bradford" (seqno 13).
    Found volume group "vg_bradford"
    Found volume group "vg_bradford"
    Suspending vg_bradford-lv_swap (253:2) with device flush
    Found volume group "vg_bradford"
    Creating vg_bradford-pvmove0
    Loading vg_bradford-pvmove0 table
    Resuming vg_bradford-pvmove0 (253:8)
    Found volume group "vg_bradford"
    Loading vg_bradford-pvmove0 table
    Suppressed vg_bradford-pvmove0 identical table reload.
    Loading vg_bradford-lv_swap table
    Resuming vg_bradford-lv_swap (253:2)
    Checking progress every 15 seconds
  /dev/sda2: Moved: 8,9%
  /dev/sda2: Moved: 17,7%
  /dev/sda2: Moved: 26,6%
  /dev/sda2: Moved: 35,5%
  /dev/sda2: Moved: 44,3%
  /dev/sda2: Moved: 53,0%
  /dev/sda2: Moved: 61,8%
  /dev/sda2: Moved: 70,5%
  /dev/sda2: Moved: 79,4%
  /dev/sda2: Moved: 88,2%
  /dev/sda2: Moved: 97,0%
  /dev/sda2: Moved: 100,0%
    Found volume group "vg_bradford"
    Found volume group "vg_bradford"
    Loading vg_bradford-lv_swap table
    Suspending vg_bradford-lv_swap (253:2) with device flush
    Suspending vg_bradford-pvmove0 (253:8) with device flush
    Found volume group "vg_bradford"
    Found volume group "vg_bradford"
    Found volume group "vg_bradford"
    Resuming vg_bradford-pvmove0 (253:8)
    Found volume group "vg_bradford"
    Resuming vg_bradford-lv_swap (253:2)
    Found volume group "vg_bradford"
    Removing vg_bradford-pvmove0 (253:8)
    Found volume group "vg_bradford"
    Removing temporary pvmove LV
    Writing out final volume group after pvmove
    Creating volume group backup "/etc/lvm/backup/vg_bradford" (seqno 15).
bradford:~#
Comment 4 Brian J. Murrell 2011-01-13 11:58:40 EST
(In reply to comment #2)
> So you spotted and corrected the error in the syntax:-)

I just ran into this.  This is being acknowledged as a bug, yes?

The manpage says that the ending target extent is optional, and really it should be.  It's absolutely determinable.
Comment 5 Alasdair Kergon 2011-01-13 12:21:33 EST
/dev/sda2:28720        extent 28720 only
/dev/sda2:28720-       extents from 28720 to end of device
/dev/sda2:28720-29695  extents 28720 to 29695 inclusive
Comment 6 Brian J. Murrell 2011-01-13 12:25:58 EST
(In reply to comment #5)
> /dev/sda2:28720        extent 28720 only
> /dev/sda2:28720-       extents from 28720 to end of device

Ahhh.  This is the syntax I was confusing with the one prior.  I was forgetting to put the - at the end.  Thanks for reminding me.

> /dev/sda2:28720-29695  extents 28720 to 29695 inclusive

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