Volumes created before v10: mount unit keeps `/dev/sdX` after disk path migration, wrong disk mounted after reboot
-
Version: 10.1.6 (also checked current
master, no change in the related code)Summary
The migration
20260611170000-stabilize-diskpaths.jschangesdiskPathof ext4/xfs volumes in the database to a stable/dev/disk/by-id/...path. It does not rewrite the systemd mount unit in/etc/systemd/system/. The unit keeps the kernel device name (for exampleWhat=/dev/sdb). The dashboard shows the by-id path, but systemd mounts/dev/sdb.When a server has more than one block device, the kernel can assign
sdbandsdcin a different order after a reboot. Then Cloudron mounts the wrong disk into the volume.What happened
- In February 2026 we created a volume on a Hetzner disk. The dashboard only offered
/dev/sdbat that time. The unit file gotWhat=/dev/sdb. - After the update to v10, the dashboard showed
/dev/disk/by-id/scsi-0HC_Volume_<id>for this volume. The unit file did not change (file date still February 2026). - In November 2026 we attached a second Hetzner disk and created a second volume. This volume got a correct by-id unit.
- The next reboot (unattended-upgrades) was the first boot with both disks. The kernel swapped
sdbandsdc. - 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
Nextcloud is not installed. - "Remount" in the dashboard did not help. It restarts the existing unit and mounts
/dev/sdbagain.
The database was not affected. After we fixed the unit file, the app started normally with all data.
Cause in the code
migrations/20260611170000-stabilize-diskpaths.jsupdatesvolumes.mountOptionsJsonandbackupSites.configJsononly. It does not touch the unit files.src/scripts/remountmount.shonly runssystemctl stopandsystemctl starton the existing unit.src/mounts.jswritesWhat=frommountOptions.diskPathonly when a mount is added.
The same problem can affect backup sites with the ext4/xfs provider.
How to check
grep --with-filename "^What=/dev/sd" /etc/systemd/system/mnt-*.mountEach result is a unit that uses an unstable device name.
Workaround
Stop the apps that use the volume, then:
cp /etc/systemd/system/mnt-volumes-<volume-id>.mount /root/ sed --in-place 's|^What=/dev/sd.*$|What=/dev/disk/by-id/scsi-0HC_Volume_<id>|' /etc/systemd/system/mnt-volumes-<volume-id>.mount systemctl daemon-reload systemctl restart mnt-volumes-<volume-id>.mount docker restart sftpThen start the apps again.
Suggested fix
One of these options:
- A migration that rewrites the unit files of all volumes and backup sites with the changed
diskPath, followed bysystemctl daemon-reload. - Let "Remount" generate the unit file from the database before it starts the unit. Then the dashboard button also repairs old installations.
The text was not written by myself, I would be to lazy and stupid to create it without typos/mistakes.

- In February 2026 we created a volume on a Hetzner disk. The dashboard only offered
-
-
G girish has marked this topic as solved
-
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.
Or does cloudron handles volumes now differently in the next version?
-
@tobiasb 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).
-
@tobiasb 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).
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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better ๐
Register Login
Thanks for reporting in any case.