all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH storage] zfs: fix #3345 restore container volume to ZFS with size 0
@ 2021-04-09 15:10 Aaron Lauterer
  2021-04-12 12:39 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Aaron Lauterer @ 2021-04-09 15:10 UTC (permalink / raw)
  To: pve-devel

A restore to ZFS for a container which has a volume (rootfs / mount
point) of size 0 failed because the refquota property does not accept
'0k' but wants 'none' in that situation.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
 PVE/Storage/ZFSPoolPlugin.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm
index fe65ae4..2e2abe3 100644
--- a/PVE/Storage/ZFSPoolPlugin.pm
+++ b/PVE/Storage/ZFSPoolPlugin.pm
@@ -334,9 +334,10 @@ sub zfs_create_subvol {
     my ($class, $scfg, $volname, $size) = @_;
 
     my $dataset = "$scfg->{pool}/$volname";
+    my $quota = $size ? "${size}k" : "none";
 
     my $cmd = ['create', '-o', 'acltype=posixacl', '-o', 'xattr=sa',
-	       '-o', "refquota=${size}k", $dataset];
+	       '-o', "refquota=${quota}", $dataset];
 
     $class->zfs_request($scfg, undef, @$cmd);
 }
-- 
2.20.1





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH storage] zfs: fix #3345 restore container volume to ZFS with size 0
  2021-04-09 15:10 [pve-devel] [PATCH storage] zfs: fix #3345 restore container volume to ZFS with size 0 Aaron Lauterer
@ 2021-04-12 12:39 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-04-12 12:39 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

On 09.04.21 17:10, Aaron Lauterer wrote:
> A restore to ZFS for a container which has a volume (rootfs / mount
> point) of size 0 failed because the refquota property does not accept
> '0k' but wants 'none' in that situation.
> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
>  PVE/Storage/ZFSPoolPlugin.pm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-12 12:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 15:10 [pve-devel] [PATCH storage] zfs: fix #3345 restore container volume to ZFS with size 0 Aaron Lauterer
2021-04-12 12:39 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal