public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Aaron Lauterer <a.lauterer@proxmox.com>
To: Maximiliano Sandoval <m.sandoval@proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH storage v3] fix #4272: btrfs: add rename feature
Date: Fri, 5 Jul 2024 14:57:31 +0200	[thread overview]
Message-ID: <cc271b3c-fdd2-4959-b248-5ca999ef89b7@proxmox.com> (raw)
In-Reply-To: <s8oh6d4ko4c.fsf@proxmox.com>

Without my changes I get the following error when I try to do it with 
the manually places qcow2 file:

Storage does not support moving of this disk to another VM (500)

And if I enable qcow2 for the rename feature without adding the format 
check in the rename_volume function:

diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index 7376ae4..56730d1 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -619,7 +619,7 @@ sub volume_has_feature {
             current => { qcow2 => 1, raw => 1, vmdk => 1 },
         },
         rename => {
-           current => { raw => 1 },
+           current => { qcow2 => 1, raw => 1 },
         },
      };

it fails with the following error:

internal error: bad disk name: 104/vm-104-disk-1.qcow2 at 
/usr/share/perl5/PVE/Storage/BTRFSPlugin.pm: 951


On  2024-07-05  14:41, Maximiliano Sandoval wrote:
> Aaron Lauterer <a.lauterer@proxmox.com> writes:
> 
>> gave it a try and it does what it should.
>> by enabling the rename feature only for `raw` we avoid potential pitfalls if we
>> encounter a non regular situation on BTRFS. For example, an
>> images/{vmid}/vm-{vmid}-disk-X.qcow2 file directly instead of the
>> images/{vmid}/vm-{vmid}-disk-X/disk.raw as is the way the BTRFS plugin handles
>> it in subvolumes.
>>
>> But if we add the following diff, it seems to handle the case of a qcow2 file in
>> the same directory structure just fine:
> 
> Did you try it without your patch? I tested it here and it seemed to
> work from my limited testing.
> 


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2024-07-05 12:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-04 12:02 Maximiliano Sandoval
2024-07-04 14:47 ` Aaron Lauterer
2024-07-05 12:41   ` Maximiliano Sandoval
2024-07-05 12:57     ` Aaron Lauterer [this message]
2024-07-05 13:14   ` Maximiliano Sandoval

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=cc271b3c-fdd2-4959-b248-5ca999ef89b7@proxmox.com \
    --to=a.lauterer@proxmox.com \
    --cc=m.sandoval@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