[pve-devel] [PATCH storage] Revert "workaround zfs create -V error for unaligned sizes"

Aaron Lauterer a.lauterer at proxmox.com
Wed Jun 14 13:28:53 CEST 2023


This reverts commit cdef3abb25984c369571626b38f97f92a0a2fd15.

The bug should be fixed by now [0]. The reproducer doesn't cause any
issues in my tests.

[0] https://github.com/openzfs/zfs/issues/8541

Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
AFAICT this has an affect on EFI disks which after this revert will be
528k and not 1M. Similar as if we would store it as a .raw file.

I don't know about other tiny volume datasets. The TPM is 4M already.

 src/PVE/Storage/ZFSPoolPlugin.pm | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
index 951d027..9a11d48 100644
--- a/src/PVE/Storage/ZFSPoolPlugin.pm
+++ b/src/PVE/Storage/ZFSPoolPlugin.pm
@@ -312,12 +312,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};
-- 
2.39.2






More information about the pve-devel mailing list