Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Udiskie mounting device with appended integer on remount #202

Open
jasonwryan opened this issue Apr 7, 2020 · 4 comments
Open

Udiskie mounting device with appended integer on remount #202

jasonwryan opened this issue Apr 7, 2020 · 4 comments

Comments

@jasonwryan
Copy link

I have I have a USB hard drive, labelled Apollo. On the first attempted mount, after a boot, it is successfully mounted to /media/Apollo as expected.

On subsequent attempts to mount it, it more often than not creates two mountpoints in /media: Apollo and Apollo1 and mounts the drive to the latter.

This is an issue because I have a systemd.service waiting for a mount at media-Apollo.mount, so it is not fired in the latter case. I then have to manually clean up /media/Apollo after successfully unmounting the drive.

It looks like there is some sort of race, and the initial, correct mountpoint is not available in time, so udiskie creates another.

Udiskie 1.7.3

The debug log looks innocuous to me, so if you need further logs, please let me know.

DEBUG [2020-04-07 14:32:36,812] udiskie.udisks2: +++ device_added: /org/freedesktop/UDisks2/drives/Imation_M100_USB_3_00000000000000000000000013
DEBUG [2020-04-07 14:32:36,815] udiskie.udisks2: +++ device_added: /org/freedesktop/UDisks2/block_devices/sda
DEBUG [2020-04-07 14:32:36,815] udiskie.config: IgnoreDevice(match={'is_block': False}, ignore=True) used for /org/freedesktop/UDisks2/drives/Imation_M100_USB_3_00000000000000000000000013
DEBUG [2020-04-07 14:32:36,815] udiskie.mount: not adding /org/freedesktop/UDisks2/block_devices/sda: unhandled device
DEBUG [2020-04-07 14:32:37,024] udiskie.udisks2: +++ device_added: /org/freedesktop/UDisks2/block_devices/sda1
DEBUG [2020-04-07 14:32:37,025] udiskie.config: MountOptions(match={'id_type': 'ext4'}, options=['noatime', 'sync']) used for /org/freedesktop/UDisks2/block_devices/sda1
DEBUG [2020-04-07 14:32:37,025] udiskie.mount: mounting /org/freedesktop/UDisks2/block_devices/sda1 with {'options': ['noatime', 'sync']}
mounted /org/freedesktop/UDisks2/block_devices/sda1 on /media/Apollo1
INFO [2020-04-07 14:32:37,061] udiskie.mount: mounted /org/freedesktop/UDisks2/block_devices/sda1 on /media/Apollo1
DEBUG [2020-04-07 14:32:37,065] udiskie.udisks2: +++ device_mounted: /org/freedesktop/UDisks2/block_devices/sda1
DEBUG [2020-04-07 14:32:37,065] udiskie.udisks2: +++ device_changed: /org/freedesktop/UDisks2/block_devices/sda1
DEBUG [2020-04-07 14:32:37,066] udiskie.udisks2: +++ device_changed: /org/freedesktop/UDisks2/block_devices/sda
DEBUG [2020-04-07 14:32:37,068] udiskie.config: IgnoreDevice(match={'is_block': False}, ignore=True) used for /org/freedesktop/UDisks2/drives/Imation_M100_USB_3_00000000000000000000000013
DEBUG [2020-04-07 14:32:37,069] udiskie.udisks2: +++ device_changed: /org/freedesktop/UDisks2/block_devices/sda1
@coldfix
Copy link
Owner

coldfix commented Apr 7, 2020

Hi,

thanks for your report.

This looks like the same issue as in #104 and #137 which cannot be fixed in udiskie as it does not run with root permissions. I thought this situation had improved in more recent udisks versions. What is your version of udisks?

Best, Thomas

@coldfix
Copy link
Owner

coldfix commented Apr 7, 2020

Do you usually un- and remount the device in short succession?

@jasonwryan
Copy link
Author

Thanks, Thomas.

Yes, it is very similar to the other reports, but udiskie does clean up the used mountpoint (/media/Apollo1), it is just the failed mountpoint that I have to manually remove.

No, I don't usually mount/remount in short succession. But I was debugging an error with the systemd service, and that rabbit hole led to this one :p

udisks2 2.7.6-3ubuntu0.2

FWIW, I have not encountered this error on Arch, nor can I reproduce on any of my Arch boxes (udisks2 2.8.4).

Cheers,
/J

@fmitha
Copy link

fmitha commented Sep 16, 2021

I'm seeing something similar upgrading from Debian 10 (buster) to Debian 11 (bullseye). I don't recall seeing it earlier, and definitely did not see it with buster.

udiskie normally uses /media/faheem/My Passport but is currently using /media/faheem/My Passport1. This started after my upgrade this morning.

My version of udisk2 is 2.9.2-2 and of udiskie is 2.3.2-2. These are both the current bullseye versions.

I'm using these mount points for backup, so they get mounted and unmounted throughout the day.

Since the mount points are hardwired into scripts, it obviously doesn't work for me if they keep changing. If I keep seeing problems, I'll consider the workaround described in this thread.

Is there anything I can do debug this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants