On Fri, Sep 4, 2020 at 7:41 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
I see in /tmp/damount.log that the by-path is pointing to a new sdx1 value. But it is some other sdx1 that is mounted.
Using systemd-mount from within udev RUN rule creates race condition - systemd-mount tells systemd to mount this device, but this device becomes known to systemd only after RUN commands has been executed.
I guess. That is why I listed where the by-path was pointing when the RUN command was executing. I suspected that it was not correct yet when the RUN command was executing. But I saw that it was in fact correct. So if the by-path entry points to the correct sdX1 when the RUN command runs, what else could systemd-mount or it's minions be looking at? Some other information other than the current definition of the device as it is in /dev?
You may consider using SYSTEMD_WANTS in your rule instead which points to service template; pass device name as parameter.
I do not know anything about this. I will explore. Thanks for the pointer.
I do not say it is necessary the reason for your problem, but as you also did not show any real information there is nothing that would allow to guess.
I do not know what other information to provide. I tried to be complete. If you can suggest some other information I will be happy to provide it.
The commented mount command in the script is what one might think they could use. But in the udev rule, when it is used, nothing gets mounted. So we use systemd-mount
Mount command does what it is told to do, it is just executed in separate namespace which goes away when udev helper has finished. So you never see this mount in you default namespace.
Exactly. So one must use systemd-mount. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org