<?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[Volumes created before v10: mount unit keeps `/dev/sdX` after disk path migration, wrong disk mounted after reboot]]></title><description><![CDATA[<p dir="auto"><strong>Version:</strong> 10.1.6 (also checked current <code>master</code>, no change in the related code)</p>
<h2>Summary</h2>
<p dir="auto">The migration <code>20260611170000-stabilize-diskpaths.js</code> changes <code>diskPath</code> of ext4/xfs volumes in the database to a stable <code>/dev/disk/by-id/...</code> path. It does not rewrite the systemd mount unit in <code>/etc/systemd/system/</code>. The unit keeps the kernel device name (for example <code>What=/dev/sdb</code>). The dashboard shows the by-id path, but systemd mounts <code>/dev/sdb</code>.</p>
<p dir="auto">When a server has more than one block device, the kernel can assign <code>sdb</code> and <code>sdc</code> in a different order after a reboot. Then Cloudron mounts the wrong disk into the volume.</p>
<h2>What happened</h2>
<ol>
<li>In February 2026 we created a volume on a Hetzner disk. The dashboard only offered <code>/dev/sdb</code> at that time. The unit file got <code>What=/dev/sdb</code>.</li>
<li>After the update to v10, the dashboard showed <code>/dev/disk/by-id/scsi-0HC_Volume_&lt;id&gt;</code> for this volume. The unit file did not change (file date still February 2026).</li>
<li>In November 2026 we attached a second Hetzner disk and created a second volume. This volume got a correct by-id unit.</li>
<li>The next reboot (unattended-upgrades) was the first boot with both disks. The kernel swapped <code>sdb</code> and <code>sdc</code>.</li>
<li>Both volumes were now mounted from the same disk. The Nextcloud app on the first volume started on the wrong disk, created a new empty directory structure and reported <code>Nextcloud is not installed</code>.</li>
<li>"Remount" in the dashboard did not help. It restarts the existing unit and mounts <code>/dev/sdb</code> again.</li>
</ol>
<p dir="auto">The database was not affected. After we fixed the unit file, the app started normally with all data.</p>
<h2>Cause in the code</h2>
<ul>
<li><code>migrations/20260611170000-stabilize-diskpaths.js</code> updates <code>volumes.mountOptionsJson</code> and <code>backupSites.configJson</code> only. It does not touch the unit files.</li>
<li><code>src/scripts/remountmount.sh</code> only runs <code>systemctl stop</code> and <code>systemctl start</code> on the existing unit.</li>
<li><code>src/mounts.js</code> writes <code>What=</code> from <code>mountOptions.diskPath</code> only when a mount is added.</li>
</ul>
<p dir="auto">The same problem can affect backup sites with the ext4/xfs provider.</p>
<h2>How to check</h2>
<pre><code class="language-bash">grep --with-filename "^What=/dev/sd" /etc/systemd/system/mnt-*.mount
</code></pre>
<p dir="auto">Each result is a unit that uses an unstable device name.</p>
<h2>Workaround</h2>
<p dir="auto">Stop the apps that use the volume, then:</p>
<pre><code class="language-bash">cp /etc/systemd/system/mnt-volumes-&lt;volume-id&gt;.mount /root/
sed --in-place 's|^What=/dev/sd.*$|What=/dev/disk/by-id/scsi-0HC_Volume_&lt;id&gt;|' /etc/systemd/system/mnt-volumes-&lt;volume-id&gt;.mount
systemctl daemon-reload
systemctl restart mnt-volumes-&lt;volume-id&gt;.mount
docker restart sftp
</code></pre>
<p dir="auto">Then start the apps again.</p>
<h2>Suggested fix</h2>
<p dir="auto">One of these options:</p>
<ol>
<li>A migration that rewrites the unit files of all volumes and backup sites with the changed <code>diskPath</code>, followed by <code>systemctl daemon-reload</code>.</li>
<li>Let "Remount" generate the unit file from the database before it starts the unit. Then the dashboard button also repairs old installations.</li>
</ol>
<hr />
<p dir="auto">The text was not written by myself, I would be to lazy and stupid to create it without typos/mistakes. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=b6971addb6c" class="not-responsive emoji emoji-android emoji--smile" style="height:1.4em;width:auto;vertical-align:middle" title=":D" alt="😄" /></p>
]]></description><link>https://forum.cloudron.io/topic/16279/volumes-created-before-v10-mount-unit-keeps-dev-sdx-after-disk-path-migration-wrong-disk-mounted-after-reboot</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Nov 2026 00:40:19 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/16279.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 11 Nov 2026 16:30:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Volumes created before v10: mount unit keeps `/dev/sdX` after disk path migration, wrong disk mounted after reboot on Mon, 16 Nov 2026 12:44:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a></p>
<p dir="auto">I unterstand this, we make such updates (in drupal) a no-op updates and create a new one with the fix. With a no-op update, it does not run twice. But I can not say, whether such fix needs a own migration anyway, so that 20260611170000-stabilize-diskpaths.js keeps untouched without to make it a no-op update.</p>
]]></description><link>https://forum.cloudron.io/post/132925</link><guid isPermaLink="true">https://forum.cloudron.io/post/132925</guid><dc:creator><![CDATA[tobiasb]]></dc:creator><pubDate>Mon, 16 Nov 2026 12:44:42 GMT</pubDate></item><item><title><![CDATA[Reply to Volumes created before v10: mount unit keeps `/dev/sdX` after disk path migration, wrong disk mounted after reboot on Mon, 16 Nov 2026 11:53:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tobiasb" aria-label="Profile: tobiasb">@<bdi>tobiasb</bdi></a> migrations are only run once. Once released, they cannot be edited i.e no bug fixes can be made to existing migrations. So, to fix the migration, we will have add another new migration in next cloudron release. Not sure if that is worth it since the Cloudrons will remain broken until the next release (whenever that happens).</p>
]]></description><link>https://forum.cloudron.io/post/132922</link><guid isPermaLink="true">https://forum.cloudron.io/post/132922</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Mon, 16 Nov 2026 11:53:54 GMT</pubDate></item><item><title><![CDATA[Reply to Volumes created before v10: mount unit keeps `/dev/sdX` after disk path migration, wrong disk mounted after reboot on Mon, 16 Nov 2026 11:39:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a></p>
<p dir="auto">What does mean to late? for the migration (migrations/20260611170000-stabilize-diskpaths.js), sure, when you know all instances are already on latest version. But the units are stil broken, without a fix.</p>
<p dir="auto">Or does cloudron handles volumes now differently in the next version?</p>
]]></description><link>https://forum.cloudron.io/post/132921</link><guid isPermaLink="true">https://forum.cloudron.io/post/132921</guid><dc:creator><![CDATA[tobiasb]]></dc:creator><pubDate>Mon, 16 Nov 2026 11:39:11 GMT</pubDate></item><item><title><![CDATA[Reply to Volumes created before v10: mount unit keeps `/dev/sdX` after disk path migration, wrong disk mounted after reboot on Mon, 16 Nov 2026 09:35:02 GMT]]></title><description><![CDATA[<p dir="auto">Ah good catch, was an oversight by me. I guess this is a bit late now since this happened in 10.x, and we are in 10.1.x now already <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f615.png?v=b6971addb6c" class="not-responsive emoji emoji-android emoji--confused" style="height:1.4em;width:auto;vertical-align:middle" title=":/" alt="😕" /> Thanks for reporting in any case.</p>
]]></description><link>https://forum.cloudron.io/post/132912</link><guid isPermaLink="true">https://forum.cloudron.io/post/132912</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Mon, 16 Nov 2026 09:35:02 GMT</pubDate></item></channel></rss>