[systemd-devel] udev rule to mount ext4 with data=journal

Pascal K pascalkrauth at gmail.com
Wed Jun 14 08:44:48 UTC 2017

As I am on a embedded device I am trying to avoid the usage of systemd due
to serveral reasons.


I try to follow your point:

> Note that we run udevd in its own mount namespace through MountFlags=,
> and this means no mounts will ever appear on the host anyway.

Am I right that this means that with setting ENV{mount_options} I am
setting a variable from udevd namespace, therefore "...mount -o
%E{mount_options}..." should try to run /sbin/mount with the options I
selected before?

Best regards,

Lennart Poettering <lennart at poettering.net> schrieb am Mi., 14. Juni 2017
um 10:30 Uhr:

> On Wed, 14.06.17 08:11, Pascal K (pascalkrauth at gmail.com) wrote:
> > I try to achieve that regardless the device plugged to my embedded system
> > the mount will be in folder /media/"name_of_volume".
> >
> > If I understand correctly for the usage of fstab I have to give a static
> > name for the mount point.
> It appears to me "systemd-mount" is the functionality you want to use
> for this. It will automatically derive a usable name from the device
> metadata and install an automount instance for it, so that there's the
> best chance for the device's file system to always stay in a clean state.
> You can invoke systemd-mount directly from the udev rule.
> Lennart
> --
> Lennart Poettering, Red Hat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170614/4d790d46/attachment.html>

More information about the systemd-devel mailing list