[pve-devel] [PATCH-SERIES v2] make storage migration more flexible

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Feb 25 12:35:01 CET 2020


some comments inline (see individual patches), given that we'll likely 
see some more rework I did not do any testing yet. all in all, this is 
shaping up nicely - thanks for the only tangentially related cleanups 
and refactoring!

On February 24, 2020 1:43 pm, Fabian Ebner wrote:
> This series aims to allow offline migration with '--targetstorage'
> and improve handling unsued/orphaned disks when migrating.
> It also makes it possible to migrate volumes between storages
> with different naming schemes if the same format is supported
> by both storages (e.g. migrating raw volumes between storages with
> a path and lvm storages).
> 
> The series is split up as follows:
> #1 to #4: move drive-related code into its own module
> #5 to #14: generalize snapshot_foreach_volume and add abstract volume helpers
> #15 to #21: introduce allow-rename parameter for import and change storage_migrate
>             interface to use options
> #22 to #26: allow offline migration and use allow-rename parameter
> #27 to #28: translate volume name for migration to a different storage type
> 
> See [0] for the previous version/RFC.
> 
> Changes to v1:
>     * Split off drive-related code into its own module
>     * Make snapshot_foreach_volume more flexible
>     * update_volume_ids: update the config in place
>     * Introduce allow-rename option to 'pvesm import' and
>       only rename when explicitly requested
>     * Bump APIVER and APIAGE for the storage interface changes
>     * Create simple helpers to translate a volume name between
>       different storage types
> 
> [0]: https://pve.proxmox.com/pipermail/pve-devel/2020-January/041436.html
> 
> 
> guest-common
> 
> Fabian Ebner (5):
>   Add interface for volume-related helpers
>   Add snapshot_foreach_unused_volume
>   snapshot_foreach_volume: Allow different volume selections
>   Add update_volume_ids
>   Use new storage_migrate interface
> 
>  PVE/AbstractConfig.pm | 82 +++++++++++++++++++++++++++++++++++++++----
>  PVE/Replication.pm    | 12 +++++--
>  2 files changed, 85 insertions(+), 9 deletions(-)
> 
> 
> storage:
> 
> Fabian Ebner (7):
>   pvesm import: return and print the allocated volume ID
>   storage_migrate: return volume ID of migrated volume
>   pvesm import: introduce allow_rename parameter
>   Collect optional parameters for storage_migrate into $opts
>   storage_migrate: introduce allow_rename option
>   Add volname_for_storage and print_volname helper
>   storage_migrate: use volname_for_storage to determine $target_volname
> 
>  PVE/API2/Storage/Content.pm  |  2 +-
>  PVE/CLI/pvesm.pm             | 22 +++++++---
>  PVE/Storage.pm               | 84 ++++++++++++++++++++++++++++--------
>  PVE/Storage/LVMPlugin.pm     | 17 +++++---
>  PVE/Storage/Plugin.pm        | 34 +++++++++++++--
>  PVE/Storage/ZFSPoolPlugin.pm | 13 +++---
>  6 files changed, 133 insertions(+), 39 deletions(-)
> 
> 
> qemu-server:
> 
> Fabian Ebner (13):
>   Replace drivename_hash with drivedesc_hash
>   Use parse_drive for EFI disk
>   print_drive: Use $skip to avoid the need to copy the hash
>   Create Drive.pm and move some drive-related code there
>   parse_drive: Allow parsing vmstate volumes
>   Implement volume-related helpers
>   Extend snapshot_foreach_volume to allow different selections of
>     volumes
>   Use new storage_migrate interface
>   Take note of changes to the volume IDs when migrating and update the
>     config
>   Allow specifying targetstorage for offline migration
>   Update volume IDs in one go
>   sync_disks: use allow_rename to avoid collisions on the target storage
>   sync_disks: be more verbose if storage_migrate fails
> 
>  PVE/API2/Qemu.pm        |   3 -
>  PVE/QemuConfig.pm       |  43 +++-
>  PVE/QemuMigrate.pm      |  43 +++-
>  PVE/QemuServer.pm       | 463 +--------------------------------------
>  PVE/QemuServer/Drive.pm | 474 ++++++++++++++++++++++++++++++++++++++++
>  PVE/QemuServer/Makefile |   1 +
>  6 files changed, 553 insertions(+), 474 deletions(-)
>  create mode 100644 PVE/QemuServer/Drive.pm
> 
> 
> container:
> 
> Fabian Ebner (3):
>   Extend snapshot_foreach_volume to allow different selections of
>     volumes
>   Implement volume-related helpers
>   Use new storage_migrate interface
> 
>  src/PVE/LXC/Config.pm  | 38 +++++++++++++++++++++++++++++++++-----
>  src/PVE/LXC/Migrate.pm | 10 +++++++---
>  2 files changed, 40 insertions(+), 8 deletions(-)
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 



More information about the pve-devel mailing list