[systemd-devel] Mounting a partition at the *right* time

Mantas Mikulėnas grawity at gmail.com
Mon Jan 4 04:29:23 PST 2016


On Mon, Jan 4, 2016 at 1:26 PM, Rainer Dorsch <ml at bokomoko.de> wrote:

> Hi,
>
>
>
> I am facing an issue with a .mount unit file. The task is simple: mount a
> partition at the *right* time.
>
>
>
> The system is OpenElec 6.0, which is based on CoreOS. /etc/fstab is on a
> squashfs, i.e. it cannot be easily modified and is empty:
>
>
>
> OpenELEC:~/.config/system.d # cat /etc/fstab
>
> OpenELEC:~/.config/system.d #
>
>
>
> I would like to mount /storage/.kodi/.local/storage/sdcard after /storage
> is mounted and before systemd-tmpfiles-setup.service starts executing:
>
>
>
> I created this .mount unit file:
>
>
>
> OpenELEC:~/.config/system.d # cat
> storage-.kodi-.local-storage-sdcard.mount
>
> [Unit]
>
> Description=sdcard mount script
>
>
>
> #Requires=storage.mount
>
> #After=storage.mount
>
> ConditionPathExists=/storage/.kodi/.local/storage/sdcard
>
>
>
> Conflicts=umount.target
>
> Before=umount.target systemd-tmpfiles-setup.service
>
>
>
> [Mount]
>
> What=/dev/mmcblk0p1
>
> Where=/storage/.kodi/.local/storage/sdcard
>
> Options=
>
> Type=ext4
>
>
>
>
>
> [Install]
>
> WantedBy=local-fs.target
>
>
>
Having no CoreOS experience, is "~/.config/system.d/" something specific to
OpenELEC? I hope you are not trying to use systemd's own ~/.config/systemd/
here, as that just plain doesn't make sense. (The main init system will not
look in each user's homedirs, and the per-user instances do not have mount
privileges...)

Can you check the output of `systemctl status
storage-.kodi-.local-storage-sdcard.mount`?

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20160104/03c43b28/attachment.html>


More information about the systemd-devel mailing list