On Fri, Feb 28, 2025 at 03:50:21PM +0100, Fiona Ebner wrote:
> In the BTRFS plugin, resize_volume() for a subovlume currently fails
> with "failed to get btrfs subvolume ID from: ". This is because the
> btrfs 'subvol show' command is invoked with '-q', so there is no
> output.

Curious. This must have changed in the btrfs CLI at some point. But yes,
bailing out here makes more sense with the code for the initial limit
being commented out...

(They also haven't yet implemented `--format json` for the command… -_-)

> 
> As btrfs quotas are currently not implemented, die early with a clean
> error instead.
> 
> Signed-off-by: Fiona Ebner <f.eb...@proxmox.com>
> ---
>  src/PVE/Storage/BTRFSPlugin.pm | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
> index b1f7912..db678cf 100644
> --- a/src/PVE/Storage/BTRFSPlugin.pm
> +++ b/src/PVE/Storage/BTRFSPlugin.pm
> @@ -497,6 +497,9 @@ sub volume_resize {
>  
>      my $format = ($class->parse_volname($volname))[6];
>      if ($format eq 'subvol') {
> +     # NOTE: `btrfs send/recv` actually drops quota information so 
> supporting subvolumes with
> +     # quotas doesn't play nice with send/recv.
> +     die "cannot resize subvolume - btrfs quotas are currently not 
> supported\n";
>       my $path = $class->filesystem_path($scfg, $volname);
>       my $id = '0/' . $class->btrfs_get_subvol_id($path);
>       $class->btrfs_cmd(['qgroup', 'limit', '--', "${size}k", "0/$id", 
> $path]);
> -- 
> 2.39.5


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

Reply via email to