[OpenWrt-Devel] Problem with blockd starting after partitions mounting

Rafał Miłecki zajec5 at gmail.com
Tue May 12 02:16:08 EDT 2020


On Sun, 29 Dec 2019 at 15:35, Rafał Miłecki <zajec5 at gmail.com> wrote:
> A year ago I introduced hotplug.d script meant to manage Samba shares
> in a clever way by:
> 1) Using "mount" hotplug.d event
> 2) Getting mount info from blockd
>
> Relevant commit ef1efa756e0d ("samba36: add package with hotplug.d
> script for auto sharing"):
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=ef1efa756e0d0caef41216719dcc72c71b31d8ff
>
> Today I realized it doesn't work for partitions mounted at boot time
> as blockd isn't running then and "ubus call block info" simply fails.
>
> "mount" hotplug.d events at boot time are generated by:
> 1) /etc/hotplug.d/block/10-mount calling /sbin/block hotplug
> 2) /sbin/block hotplug calling /sbin/hotplug-call mount
>
> So it's not a matter of init.d order and adjusting START in
> /etc/init.d/blockd (block devices appear EARLY).
>
> Any idea how to solve this problem? Should we maybe postpone "mount"
> events? E.g. until "blockd" start? Or should hotplug.d script somehow
> wait until "blockd" starts?

For a reference this was fixed by 9ab936d973df ("block(d): always call
hotplug.d "mount" scripts from blockd"):
https://git.openwrt.org/?p=project/fstools.git;a=commitdiff;h=9ab936d973dfbee1f8089679a9b0d0c878b987e9

-- 
Rafał

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list