<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Slow VM migration on Linstor SR]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-group plugin-mentions-a" href="/forum/groups/team-storage" aria-label="Profile: Team-Storage">@<bdi>Team-Storage</bdi></a></p>
<h1>XOSTOR (LINSTOR SR): ~200s extra delay on live migration and cold start when a host accesses a VDI for the first time</h1>
<h2>Summary</h2>
<p dir="auto">On a 4-host XCP-ng pool with a XOSTOR (LINSTOR/DRBD) shared SR, both live migration and a plain VM start take roughly 3-3.5 minutes longer than expected for an idle 4GB RAM VM, specifically when the target host has not previously held a diskful copy of that VDI's resource. Network, DRBD resync, quorum settings, and package version mismatches have all been ruled out through direct testing. SMlog/xensource.log show two separate, near-identical ~100-105 second gaps with zero log output during the gap itself, which strongly suggests a retry/timeout loop rather than actual data movement.</p>
<h2>Environment</h2>
<ul>
<li>XCP-ng pool, 4 hosts</li>
<li>Packages (identical on all 4 hosts):
<ul>
<li><code>linstor-common-1.33.1-1.el7_9</code>, <code>linstor-controller-1.33.1-1.el7_9</code>, <code>linstor-satellite-1.33.1-1.el7_9</code></li>
<li><code>linstor-client-1.27.1-1.xcpng8.3</code>, <code>python-linstor-1.27.1-1.xcpng8.3</code></li>
<li><code>xcp-ng-linstor-1.2-6.xcpng8.3</code>, <code>xcp-ng-release-linstor-1.5-1.xcpng8.3</code></li>
<li>No newer version available via <code>yum check-update</code> on the XCP-ng repos at time of testing.</li>
</ul>
</li>
<li>XOSTOR SR: <code>redundancy=3</code>, <code>provisioning=thin</code>, <code>group-name=linstor_group/thin_device</code>, created via <code>xe sr-create type=linstor</code> (CLI, no XOA wizard).</li>
<li>Resource-group has <code>DrbdOptions/Resource/on-no-quorum suspend-io</code> and <code>DrbdOptions/Resource/on-no-data-accessible suspend-io</code> set explicitly.</li>
<li>Dedicated DRBD/storage network: separate bond (active-backup, 2x25Gb/s), tagged VLAN with MTU 9000, <code>PrefNic</code> explicitly set on all nodes to use this network (confirmed via <code>linstor node list-properties</code>, not the management interface).</li>
<li>Test VM: 4GB RAM, idle at time of test, 2 disks on the XOSTOR SR (20GB and 100GB declared size).</li>
</ul>
<h2>What we ruled out</h2>
<ol>
<li><strong>Network</strong> — ping between storage-network IPs succeeds, <code>PrefNic</code> confirmed active on all nodes, MTU 9000 verified end to end.</li>
<li><strong>DRBD resync</strong> — <code>linstor resource list -r &lt;resource&gt;</code> watched live during migration shows the destination host getting the resource as <code>Diskless</code> immediately (no <code>Inconsistent</code> state, no growing <code>InSync %</code>). It is not doing a full data resync.</li>
<li><strong>Quorum settings</strong> — already applied (<code>suspend-io</code> on both properties), no change in behavior.</li>
<li><strong>Package versions</strong> — identical across all 4 hosts, no update available.</li>
<li><strong>Resource-group properties</strong> — <code>linstor resource-group list-properties</code> shows nothing beyond the quorum settings above.</li>
<li><strong><code>DrbdOptions/Resource/auto-quorum</code> property</strong> — not whitelisted in this LINSTOR version (1.33.1), had to use the primitive property names instead.</li>
</ol>
<h2>Log evidence (live migration between two hosts)</h2>
<p dir="auto"><strong>xensource.log (destination host):</strong></p>
<pre><code>09:10:36  VM.receive_memory: Synchronisation point 2
09:12:18  VM.receive_memory: Synchronisation point 3
09:12:18  VM.receive_memory: Renaming domain
09:12:18  VM.receive_memory: restoring remaining devices and unpausing
09:14:02  VM.receive_memory: Synchronisation point 4
09:14:02  Device.Dm.start domid=2 action=Restore ...
09:14:02  Got QMP event, domain-2: RESUME
</code></pre>
<p dir="auto">→ Gap 1: 09:10:36 → 09:12:18 (~102s), no log output at all during this window.<br />
→ Gap 2: 09:12:18 → 09:14:02 (~104s), same, no log output on this host during the gap.</p>
<p dir="auto"><strong>SMlog (source host), same window:</strong></p>
<pre><code>09:10:36/37  vdi_deactivate {...} (both VDIs, two threads)
[~102s of silence]
09:12:18  tap.deactivate: Shut down Tapdisk(...)
09:12:18  LinstorVDI.detach for &lt;vdi_uuid&gt;
09:12:18  Deflate /dev/drbd/by-res/xcp-volume-.../0 (new size=3410448896, previous=21523156992)
09:12:18  Deflate /dev/drbd/by-res/xcp-volume-.../0 (new size=7558312448, previous=107590782976)
</code></pre>
<p dir="auto">→ <code>vdi_deactivate</code> is called at 09:10:36/37 but <code>tap.deactivate</code> (actually stopping the tapdisk process) doesn't happen until 09:12:18 — the same ~102s gap as on the destination side, in a completely different log, on a different host.<br />
→ Once <code>tap.deactivate</code> starts, the VHD "Deflate" (thin-pool metadata shrink to actual used size) happens immediately, so that step is not the bottleneck.</p>
<p dir="auto">This behavior is 100% reproducible: it happens both on live migration and on a plain VM start on a host that previously had no diskful/diskless record for that VDI's resource. Hosts that already have an established record for the resource do not show this delay.</p>
<h2>What we're asking</h2>
<p dir="auto">Is there a documented reason for this behavior and is there a solution.</p>
<p dir="auto">We're happy to provide additional diagnostics (full SMlog excerpts, <code>linstor</code> command output, etc.) as needed. Given this also affects plain VM start (not just migration), it directly impacts HA failover time, which is why we're raising it as a priority.</p>
<p dir="auto">Thanks in advance for any pointers.</p>
]]></description><link>https://xcp-ng.org/forum/topic/12492/slow-vm-migration-on-linstor-sr</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 09:05:58 GMT</lastBuildDate><atom:link href="https://xcp-ng.org/forum/topic/12492.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 25 Sep 2026 07:31:44 GMT</pubDate><ttl>60</ttl></channel></rss>