[yocto] Questions about udev rule and systemd-udev,relevant to mounting block device
Hongzhi, Song
hongzhi.song at windriver.com
Thu Mar 1 02:35:16 PST 2018
Defect:
The exiting method of automount of udev in /oe-core/meta/ /is using
/automount.rules/ which call /mount.sh/ that using //bin/mount/ to mount
device.
But systemd-udevd detaches /mount()/ operations done within the service
from the rest of the system with MountFlag=slave, this means host can
not access device. (e.g. Executing /mkfs.ext4 /dev/sda1// prompts
//dev/sda1 is apparently in use by the system; will not make a
filesystem here!/)
Solution:
Systemd upstream suggest that the best way is to use "systemd-mount"
in udev rules, which will request the mount operation to be executed by
PID 1.
And I have tested it was effective.
Uncertain:
The exiting method is designed for /SysV-init /which is not
compatible to
systemd-udev, at least that's what I think. So I think that we should design
a new rule or organizational structure to be suitable for systemd-udev and
to mount deferent device. Dose anyone help do this? Or I can make some
improvements on the basis of the existing with "systemd-mount".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180301/4e223c85/attachment.html>
More information about the yocto
mailing list