Created
July 30, 2019 03:26
-
-
Save ilyaevseev/effc9a6a2bdc4f9bf90000a384488bd0 to your computer and use it in GitHub Desktop.
ProxmoxVE patch for Ceph RBD tuning.Taken from https://pve.proxmox.com/pipermail/pve-devel/2018-June/032787.html with debugging output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -u /usr/share/perl5/PVE/QemuServer.pm* | |
--- /usr/share/perl5/PVE/QemuServer.pm0 2019-05-25 12:40:24.000000000 +0300 | |
+++ /usr/share/perl5/PVE/QemuServer.pm 2019-06-24 07:06:34.825186937 +0300 | |
@@ -1881,6 +1881,18 @@ | |
$device .= ",serial=$serial"; | |
} | |
+ my $volid = $drive->{file}; | |
+ if ($volid && $drive->{discard}) { | |
+ my $storage_name = PVE::Storage::parse_volume_id($volid); | |
+ if ($storecfg->{ids}->{$storage_name}->{type} eq 'rbd') { | |
+ $device .= ",discard_granularity=4194304"; | |
+ print "DBUG: VM $vmid, volume $volid = rbd, discard\n"; | |
+ } else { | |
+ print "DBUG: VM $vmid, volume $volid = no rbd\n"; | |
+ } | |
+ } else { | |
+ print "DBUG: VM $vmid, volume $volid = no discard\n"; | |
+ } | |
return $device; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment