USB drives won't mount when uptime is more than several days (UM 22.04 LTS)

HI all,

When my uptime exceeds several days, external USB disk drives won't mount anymore.
I encountered this several times. One time it even introduced a (luckily recoverable) error in the filesystem of one of my USB drives.

When I reboot and (after login) hotplug the USBdrives again, it works without problem.

I checked the logs and found some cryptic, possibly unrelated, errors:

systemd-udevd[474]: sda: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sda' failed with exit code 1.
systemd-udevd[491]: sda1: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sda1' failed with exit code 1.
systemd-udevd[2694]: sdb: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sdb' failed with exit code 1.
systemd-udevd[2694]: sdb1: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sdb1' failed with exit code 1.

I would like to know if anyone encountered the same issues before I file a bug against udevd.

EDIT: It does not seem to be a memoryleak, still have 15GB (out of 16GB) free when the issue crops up.

1 Like

Not seeing here UM22.04.3
Checking my uptime averages around 14 days due to rebooting after kernel updates.
Have one 16gb. flash drive plugged in all the time for rolling backup and in course of operations plug in 2 different 2tb. removable drives with no problems to do a partial backup of my accumulated changes.
May not apply to me as see the magic 4 letter S word in your log output and my system does not have it. Searched on /usr/bin/snap auto-imp and found some hits.


TNX! :slight_smile:
Good to know, I removed snap from my system and will see in a few days if it did the trick.

removing snap is much more involved than a simple apt-get purge snap*
It was quite stunning to see how deep snap's claws hook into this system. I had to resort to the 'sledgehammer approach' (single user mode and extremely liberal use of rm -rf ) to get rid of all snapd's remnants.

I also marked 'affects me too' on this bug after checking my logs:


Sounds like a good scripting project. :smile:
I'm lazy have to go to my Calc sheet and enter the commands one by one.


Could you send me (the contents of) that calc sheet ?
It may be of use and I might learn something from it.
Based on that sheet , I could probably script it. :slight_smile:

1 Like

Since I removed all 'snap' related code, I don't have the problem anymore.

At this moment I have an uptime of almost 8 days and no troubles mounting external disks.

Seems that removing snaps/snapd is the temporary solution until the bug in the snaps/snapd/udev combination is solved.

TNX @Mendy :slight_smile: :+1: