Opensuse 12.3 patch breaks unison again

Some of you may remember the lengthy discussion we had trying to sort out why unison could no longer find folders on USB drives.

We eventually found, thanks to Carlos, that creating a file called

99-correct-media-mount-point.rules in the directory /etc/udev/rules.d/ and adding the text Then I opened the file with kwrite and added the
ENV{ID_FS_USAGE}==“filesystem|other|crypto”, ENV{UDISKS_FILESYSTEM_SHARED}=“1” and saving the file was the cure. Then I
used the command udevadm control --reload in a terminal window and rebooted and my files were no properly under /media again.

Recently I let YAST do an online update, and whatever updates it did it hosed the fix.

What do I need to do now, since applying the previous fix no longer works?

Thanks, Bob

On 2014-01-13 21:36, robertsmits wrote:

> What do I need to do now, since applying the previous fix no longer
> works?

Ugh.

I remember that thread, but not the details.

I don’t know the answer.

Maybe your edits were overwritten and you have to create them again.

I would mount manually, but maybe you said that this would not work for
you or something, I don’t remember.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Hi Carlos. Thanks for responding. The problem was that I was syncing files with unison to a USB drive. Beginning with 12.3, the files are not mounted under /media the way they were under 12.2, and following your advice I created a file called 99-correct-media-mount-point.rules in the directory /etc/udev/rules.d/. I added the following line to the file - ENV{ID_FS_USAGE}==“filesystem|other|crypto”,ENV{UDISKS_FILESYSTEM_SHARED}=“1” and then ran the command udevadm control --reload from the terminal.

This fixed the problem and my usb drive would show up under /media as before. Unison could find it too.

I did an online update and something broke because now unison crashes again when I try to select a USB drive, and says it can’t find it. What happens now is that the USB drive’s name changes every time you connect it.

For example, the first time it connects (it has a volume name of “My Backup”) the USB drive is mounted as /media/My Backup. The second time it’s mounted as /media/My Backup1. The third time it’s /media/My Backup2.

Not only that but it leaves empty folders under /media with the previous names. Can anyone suggest why I’m getting this bizarre behaviour?

On 2014-01-17 23:56, robertsmits wrote:
>
> Hi Carlos. Thanks for responding. The problem was that I was syncing
> files with unison to a USB drive. Beginning with 12.3, the files are not
> mounted under /media the way they were under 12.2, and following your
> advice I created a file called 99-correct-media-mount-point.rules in the
> directory /etc/udev/rules.d/. I added the following line to the file -
> ENV{ID_FS_USAGE}==“filesystem|other|crypto”,ENV{UDISKS_FILESYSTEM_SHARED}=“1”
> and then ran the command udevadm control --reload from the terminal.

Ah… yes, I remember that - after you refreshed my memory, thanks :slight_smile:

> This fixed the problem and my usb drive would show up under /media as
> before. Unison could find it too.
>
> I did an online update and something broke because now unison crashes
> again when I try to select a USB drive, and says it can’t find it. What
> happens now is that the USB drive’s name changes every time you connect
> it.

What, the name changes? :open_mouth:

> For example, the first time it connects (it has a volume name of “My
> Backup”) the USB drive is mounted as /media/My Backup. The second time
> it’s mounted as /media/My Backup1. The third time it’s /media/My
> Backup2.

AH! Yes, I know why.

> Not only that but it leaves empty folders under /media with the previous
> names. Can anyone suggest why I’m getting this bizarre behaviour?

Yes, that’s what I thought.

Too bad…

The following is a guess. No proofs.

Well, the developers want us to use the new method of mounting under
/run/something (sorry, I forget the long path). Mounting again under
/media with that patch is against their wishes (this is true, I know.
They told me as much).

What happens is, I think, that something was changed so that when the
device is umounted the empty mount point, which now is an empty
directory, is not automatically removed as it should.

I guess hat this broken change was simply not reviewed because they
simply are not interested in us using /media for mounting devices.

Bad luck.

Again, I repeat, the above is a guess.

Well, you can try reporting this in Bugzilla. Not the unison part, but
the part about the directories not being removed. You have to mention
the hack used, which comes from another Bugzilla which I might be able
to hunt for you.

And for the time being, you have to remove the empty directories
yourself, manually.

Otherwise, undo the patch-hack, and create in /media symlinks to
/run/whatevernewmountplace instead. /IF/ unison is happy with that, of
course…

Notice: I have one machine I use with 13.1, and I have not seen this
behaviour. I can try, though.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

The new location is /run/media/theusername/devicename

So the new location is now associated with the user that inserted the device

I guess that might confuse some programs :open_mouth: