[pve-devel] [PATCH v2 container 3/3] special case btrfs+quotas to use subvolumes

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Jun 23 15:51:29 CEST 2021


On June 22, 2021 2:18 pm, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
> ---
> New in v2.
> 
>  src/PVE/LXC.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index 0a8a532..fc06842 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -1893,7 +1893,7 @@ sub alloc_disk {
>      eval {
>  	my $do_format = 0;
>  	if ($scfg->{content}->{rootdir} && $scfg->{path}) {
> -	    if ($size_kb > 0) {
> +	    if ($size_kb > 0 && !($scfg->{type} eq 'btrfs' && $scfg->{quotas})) {

this is actually not enough.. btrfs with quotas now creates subvols with 
size 0 (== no quota), and then everything fails because the storage 
plugin expects a quota to be there but there is none. even with that 
fixed up, at least resize_disk is still broken:

$ pct resize 123 mp0 +1G
btrfs error: ERROR: invalid qgroupid or subvolume path: 0/0/286

the actual qgroupid should be 0/286..

>  		$volid = PVE::Storage::vdisk_alloc($storecfg, $storage, $vmid, 'raw', undef, $size_kb);
>  		$do_format = 1;
>  	    } else {
> -- 
> 2.30.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 





More information about the pve-devel mailing list