ITADN

Stale mount point directory left behind on shutdown causes external drive to mount as "MyDrive (2)" on next boot

#2146Openkeenish27 创建于 2026-05-15
K
keenish27commented
**Umbrel** OS Version: 1.7.3 **Device**: Umbrel Home **Summary**: When multiple apps shut down simultaneously, Umbreld's external storage stop handler fires multiple times in quick succession during shutdown. The second invocation interrupts the first before it can clean up the empty mount point directory. On the next boot, Umbreld sees the stale directory as occupied and appends (2) to the mount name, causing any apps with hardcoded paths to the external drive (e.g. Plex) to lose access to their media. **Expected behavior:** After unmounting, Umbreld should always clean up the empty mount point directory regardless of how many times the stop handler is invoked during shutdown. The next boot should always mount the drive to the original name with no suffix. **Actual behavior:** The shutdown log shows two Stopping external storage / Unmounting all external devices sequences firing 12 seconds apart: > 02:55:25 umbreld: Stopping external storage > 02:55:25 umbreld: Unmounting all external devices > 02:55:25 umbreld: Unmounting partition sda2 > 02:55:25 systemd: home-umbrel-umbrel-external-MyDrive.mount: Deactivated successfully > 02:55:29 ntfs-3g: Unmounting /dev/sda2 (MyDrive) > ← "Cleaning up left over mount point MyDrive" never logged > 02:55:37 umbreld: Stopping external storage ← second invocation interrupts cleanup > 02:55:37 umbreld: Unmounting all external devices The normal post-unmount log line Cleaning up left over mount point MyDrive never appears, confirming the directory cleanup was skipped. The empty /home/umbrel/umbrel/external/MyDrive directory persists on disk. On next boot: > 02:56:19 umbreld: Mounted partition JMicron RAID-1 MyDrive as /External/MyDrive (2) **Steps to reproduce:** 1. Have an NTFS external drive mounted and named e.g. MyDrive 2. Reboot or shut down while multiple apps (Plex, Home Assistant, etc.) are running 3. The simultaneous Docker container shutdowns appear to each trigger the external storage stop handler 4. On next boot the drive mounts as MyDrive (2) instead of MyDrive Workaround: Check if /home/umbrel/umbrel/external/<drivename> exists as an empty unmounted directory after the (2) duplicate appears. If so: `sudo rmdir "/home/umbrel/umbrel/external/MyDrive"` Umbreld will detect the freed name within ~60 seconds and remount cleanly without the (2) suffix. **Additional context:** The second Stopping external storage invocation appears to be triggered by Docker compose deprecation warnings (networks.default: external.name is deprecated) firing from multiple apps shutting down simultaneously. It's possible the deprecation warning handling is inadvertently re-triggering the external storage stop routine.
0 条评论