pvmove doesn't work the way the man page says
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
LVM 2.02.66-4ubuntu7 on Ubuntu 12.04 LTS:
The man page for pvmove says it creates many temporary mirror segments to sync each segment then breaks the mirror and mirrors the next segment, thus allowing the move to be resumed after a reboot approximately where it left off.
This does not appear to be the case. Looking at dmsetup table during a move of two logical volumes, there is one mirror segment for the entire logical volume being moved, and a linear for the next logical volume. So it appears that logical volumes are copied as a whole unit and a reboot will restart the copy from the beginning.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJRG7SKAAoJEJrBOlT6nu75v9EIANJebrBr5xmUEVV6yp0Kd7pT rYqmpt3+VTvp433IgNQ+AaFyP637Bi14EZc9j+2KHas7nw9aNCPcqYSry5VvqyXG 1VMu5v3/af8f49KauZnMyFPkfroIBWOpzCe1d3XcyRHrzNCbnosYhLP2V6VsbOh8 Vs7DcJhJjxnCsSKfvQ6SoQZmQeGwe+DHxoUpAB2kXuRf1JTBFlu5VB90ETGmLTyr WAW5SgFiv0F87w72MDxH8AFdNu80tQSjqXSiKcCNsGgvldncGu/wPbFjWDBTa7R4 /vsbsD10Kg64QZCLobie75uBC2cdLB2a4LFDVei4rwNEd/Ofs3Pt0uSG64IF0ao= =iRzK
-----END PGP SIGNATURE-----
Quoted 6 lines · Phillip Susi
there is one mirror segment for the
entire logical volume being moved, and a linear for the next logical volume.2. Every logical volume in the volume group is searched for contiguous data that need moving according to the command line arguments. For each piece of data found, a new segment is added to the end of the pvmove LV. This segment takes the form of a temporary mirror
so it DOES behave according to the manpage
breaking it up in smaller subsegments would probably have been wiser, except that you risk to induce fragmentation if other LVM operations happen during the move.
Quoted 1 line · Spelic
breaking it up in smaller subsegments would probably have been wiser,
The plan was always for more frequent checkpoints, but it involves more complicated code and there's simply been no need to do this: given how rarely pvmove is used, the current approach seems to be good enough and nobody's written the extra code yet.
Alasdair
Quoted 9 lines · Alasdair G Kergon
Quoted 1 line · Spelic
breaking it up in smaller subsegments would probably have been wiser,
The plan was always for more frequent checkpoints, but it involves more complicated code and there's simply been no need to do this: given how rarely pvmove is used, the current approach seems to be good enough and nobody's written the extra code yet.
Alasdair
Should not then the man page be fixed to match actual behavior (and not only at this place)? Otherwise it is a wish list.
Bugzilla is IMO more appropriate tracker for RFEs.
-- Marian
Quoted 6 lines
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Quoted 1 line · Marian Csontos
Should not then the man page be fixed to match actual behavior (and not
As already stated on this thread, the man page does describe what the code currently does.
Alasdair
Quoted 6 lines · Alasdair G Kergon
Quoted 2 lines · Marian Csontos
Should not then the man page be fixed to match actual behavior (and not
As already stated on this thread, the man page does describe what the code currently does.
I must apologize! Excuse me for being an ... (donkey?).
I had been reading it just few days ago, and got confused as well and would be almost willing to testify...
Rereading it carefully again, knowing what it is supposed to say, it really does say so.
-- Marian
Quoted 7 lines
Alasdair
_______________________________________________ linux-lvm mailing list [email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Quoted 7 lines · Alasdair G Kergon
Quoted 1 line · Spelic
breaking it up in smaller subsegments would probably have been wiser,
The plan was always for more frequent checkpoints, but it involves more complicated code and there's simply been no need to do this: given how rarely pvmove is used, the current approach seems to be good enough and nobody's written the extra code yet.
Also, if you want more frequent checkpoints,
you can do that by calling pvmove appropriately:
just don't move the whole thing at once,
but repeatedly call pvmove with an explicit extent range.
Lars
Please use reply-to-all on public mailing lists; I did not see there had been any replies until now because I was not Cc'd.
Quoted 3 lines · Spelic
breaking it up in smaller subsegments would probably have been wiser, except that you risk to induce fragmentation if other LVM operations happen during the move.
There's no risk of fragmentation because you still allocate the whole thing at once, you just set it up as (linear, mirror, linear) instead of one big mirror, and the mirror portion slides over when synced.