Signed-off-by: Wolfgang Bumiller <[email protected]>
---
src/PVE/API2/LXC.pm | 9 +++++++--
src/PVE/LXC.pm | 20 ++++++++++++--------
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index a56c441..aa11fc6 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1990,8 +1990,13 @@ __PACKAGE__->register_method({
);
} else {
print "create linked clone of mount point $opt
($volid)\n";
- $newvolid =
- PVE::Storage::vdisk_clone($storecfg, $volid,
$newid, $snapname);
+ $newvolid = PVE::Storage::vdisk_clone(
+ $storecfg,
+ $volid,
+ $newid,
+ $snapname,
+ 'ct-vol',
+ );
}
push @$newvollist, $newvolid;
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 741bb33..d72ac79 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -2285,21 +2285,25 @@ sub alloc_disk {
my $do_format = 0;
if ($scfg->{content}->{rootdir} && $scfg->{path}) {
if ($size_kb > 0 && !($scfg->{type} eq 'btrfs' &&
$scfg->{quotas})) {
- $volid =
- PVE::Storage::vdisk_alloc($storecfg, $storage, $vmid,
'raw', undef, $size_kb);
+ $volid = PVE::Storage::vdisk_alloc(
+ $storecfg, $storage, $vmid, 'raw', undef, $size_kb,
'ct-vol',
+ );
$do_format = 1;
} else {
- $volid = PVE::Storage::vdisk_alloc($storecfg, $storage, $vmid,
'subvol', undef,
- $size_kb);
+ $volid = PVE::Storage::vdisk_alloc(
+ $storecfg, $storage, $vmid, 'subvol', undef, $size_kb,
'ct-vol',
+ );
$needs_chown = 1;
}
} elsif ($scfg->{type} eq 'zfspool') {
- $volid =
- PVE::Storage::vdisk_alloc($storecfg, $storage, $vmid,
'subvol', undef, $size_kb);
+ $volid = PVE::Storage::vdisk_alloc(
+ $storecfg, $storage, $vmid, 'subvol', undef, $size_kb,
'ct-vol',
+ );
$needs_chown = 1;
} elsif ($scfg->{content}->{rootdir}) {
- $volid =
- PVE::Storage::vdisk_alloc($storecfg, $storage, $vmid, 'raw',
undef, $size_kb);
+ $volid = PVE::Storage::vdisk_alloc(
+ $storecfg, $storage, $vmid, 'raw', undef, $size_kb, 'ct-vol',
+ );
$do_format = 1;
} else {
die "content type 'rootdir' is not available or configured on
storage '$storage'\n";
--
2.47.2
_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel