public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server] allow migrating raw btrfs volumes
Date: Thu, 10 Jun 2021 14:35:30 +0200	[thread overview]
Message-ID: <1623328402.jo4fj3v9o7.astroid@nora.none> (raw)
In-Reply-To: <20210609131852.167416-9-w.bumiller@proxmox.com>

On June 9, 2021 3:18 pm, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  PVE/QemuMigrate.pm | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
> index 6375a15..5b07c20 100644
> --- a/PVE/QemuMigrate.pm
> +++ b/PVE/QemuMigrate.pm
> @@ -502,7 +502,10 @@ sub scan_local_volumes {
>  		# exceptions: 'zfspool' or 'qcow2' files (on directory storage)
>  
>  		die "online storage migration not possible if snapshot exists\n" if $self->{running};
> -		if (!($scfg->{type} eq 'zfspool' || $local_volumes->{$volid}->{format} eq 'qcow2')) {
> +		if (!($scfg->{type} eq 'zfspool'
> +		    || ($scfg->{type} eq 'btrfs' && $local_volumes->{$volid}->{format} eq 'raw')
> +		    || $local_volumes->{$volid}->{format} eq 'qcow2'
> +		)) {
>  		    die "non-migratable snapshot exists\n";
>  		}
>  	    }
> @@ -553,7 +556,7 @@ sub scan_local_volumes {
>  	    my ($sid, $volname) = PVE::Storage::parse_volume_id($volid);
>  	    my $scfg =  PVE::Storage::storage_config($storecfg, $sid);
>  
> -	    my $migratable = $scfg->{type} =~ /^(?:dir|zfspool|lvmthin|lvm)$/;
> +	    my $migratable = $scfg->{type} =~ /^(?:dir|btrfs|zfspool|lvmthin|lvm)$/;

also stumbled upon this when doing the remote migrate stuff - AFAICT, 
this is basically a leftover thing from when migration was more limited. 
atm this is basically every built-in storage type that is not shared 
(and for remote migration, we'd add most shared storage types as well).

I'd either drop it altogether, or move it to the storage plugin 
definition (possible two booleans - one for NBD-based qemu migration, 
one for storage migration?).

>  
>  	    die "can't migrate '$volid' - storage type '$scfg->{type}' not supported\n"
>  		if !$migratable;
> -- 
> 2.30.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 




      reply	other threads:[~2021-06-10 12:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 13:18 [pve-devel] [PATCH multiple] btrfs, file system for the brave Wolfgang Bumiller
2021-06-09 13:18 ` [pve-devel] [PATCH common] Syscalls/Tools: add renameat2 Wolfgang Bumiller
2021-06-15 12:35   ` [pve-devel] applied: " Thomas Lamprecht
2021-06-09 13:18 ` [pve-devel] [PATCH storage 1/4] fix find_free_disk_name invocations Wolfgang Bumiller
2021-06-15 12:36   ` [pve-devel] applied: " Thomas Lamprecht
2021-06-09 13:18 ` [pve-devel] [PATCH storage 2/4] add BTRFS storage plugin Wolfgang Bumiller
2021-06-10 12:40   ` Fabian Grünbichler
2021-06-10 12:59     ` Wolfgang Bumiller
2021-06-11 12:11   ` Fabian Ebner
2021-06-09 13:18 ` [pve-devel] [PATCH storage 3/4] update import/export storage API Wolfgang Bumiller
2021-06-10 12:30   ` Fabian Grünbichler
2021-06-09 13:18 ` [pve-devel] [PATCH storage 4/4] btrfs: add 'btrfs' import/export format Wolfgang Bumiller
2021-06-09 13:18 ` [pve-devel] [PATCH container 1/2] migration: fix snapshots boolean accounting Wolfgang Bumiller
2021-06-09 13:18 ` [pve-devel] [PATCH container 2/2] enable btrfs support via subvolumes Wolfgang Bumiller
2021-06-10 12:35   ` Fabian Grünbichler
2021-06-09 13:18 ` [pve-devel] [PATCH qemu-server] allow migrating raw btrfs volumes Wolfgang Bumiller
2021-06-10 12:35   ` Fabian Grünbichler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1623328402.jo4fj3v9o7.astroid@nora.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal