[pve-devel] [PATCH storage] Revert "workaround zfs create -V error for unaligned sizes"
Fabian Ebner
f.ebner at proxmox.com
Thu Jun 10 14:33:25 CEST 2021
Works for me. A tiny issue is that the disk size in the VM config does
not show the actual value afterwards, but that is nothing new.
Tested-by: Fabian Ebner <f.ebner at proxmox.com>
Am 09.06.21 um 15:54 schrieb Aaron Lauterer:
> https://github.com/zfsonlinux/zfs/issues/8541 is solved and part of
> openzfs 2.0 with [0]. Since we ship only ZFS 2.0 with PVE 7 we should be
> okay to remove our workaround
>
> [0] https://github.com/openzfs/zfs/commit/47c9299fcc9e5fb91d0b1636bfacc03bd3e98439
>
> This reverts commit cdef3abb25984c369571626b38f97f92a0a2fd15.
> ---
> PVE/Storage/ZFSPoolPlugin.pm | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm
> index 2e2abe3..f719f42 100644
> --- a/PVE/Storage/ZFSPoolPlugin.pm
> +++ b/PVE/Storage/ZFSPoolPlugin.pm
> @@ -313,12 +313,7 @@ sub zfs_get_pool_stats {
>
> sub zfs_create_zvol {
> my ($class, $scfg, $zvol, $size) = @_;
> -
> - # always align size to 1M as workaround until
> - # https://github.com/zfsonlinux/zfs/issues/8541 is solved
> - my $padding = (1024 - $size % 1024) % 1024;
> - $size = $size + $padding;
> -
> +
> my $cmd = ['create'];
>
> push @$cmd, '-s' if $scfg->{sparse};
>
More information about the pve-devel
mailing list