Re: [EXT] Launch a mount unit from udev rule via ENV{SYSTEMD_WANTS}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Il giorno gio 16 feb 2023 alle ore 08:39 Ulrich Windl <Ulrich.Windl@xxxxxxxxxxxxxxxxxxxx> ha scritto:
>>> Jacopo <fingolfin00@xxxxxxxxx> schrieb am 15.02.2023 um 17:59 in Nachricht
<CAO-AGAuKP=BvtTfGOpCcePGaZAiqzcA9+exi0V-rSYkLNMLohg@xxxxxxxxxxxxxx>:
> I'be been having issues lately trying to automatically remount an external
> USB drive that is mounted at boot from an fstab entry:
> LABEL=data-ssd  /opt/data-ssd  ext4  defaults,nofail,users  0  2
>
> I'm using systemd 244 and after some investigation I learned about the
> possibility to launch a systemd unit from a udev rule via
> ENV{SYSTEMD_WANTS} (see here
> https://github.com/systemd/systemd/issues/22589#issuecomment-1047940003 and
> https://github.com/systemd/systemd/pull/11373#issuecomment-594014841)
>
> In particular the second suggestion is exactly what I need, but the only
> way I could make it work was launching a dummy.service that "Wants" the
> corresponding mount unit:
>
> udev rule:
> ACTION="" SUBSYSTEM=="block", KERNEL=="sd*", SUBSYSTEMS=="usb",

And is your SSD really a "sd*" device?
 
Yeah I use a SATA-to-USB adaptor so it's exposed as /dev/sd*.

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux