Openelec.tv & mpd + remote CIFS

sm0ketst@latitude-6430u:~$ ssh root@openelec.local
root@openelec.local's password: 
##############################################
#                  OpenELEC                  #
#             http://openelec.tv             #
##############################################

OpenELEC (official) Version: 6.0.3

OpenELEC:~ # cp /storage/.config/system.d/cifs.mount.sample  /storage/.config/system.d/storage-music.mount; cat /storage/.config/system.d/storage-music.mount

OpenELEC:~ # cat /storage/.config/system.d/storage-music.mount
# This is a sample service script to mount CIFS/SAMBA shares.
# Please read carefully the comments in this file. For production usage
# you can remove all comments (lines beginning with "#") from this file.


[Unit]
# The description should be used to explain what this servicefile is for
Description=Openmediavault Audio Music cifs mount script

# if we do network mounts like here we *require* 'network-online.service'
# which checks if the network is online
Requires=network-online.service

# our scripts must start *after* 'network-online.service', on timeout and if
# 'network-online.service' fails we can not mount and this scripts fails too
After=network-online.service

# usually we mount networks shares because we want they avaible *before* XBMC starts.
# so XBMC has access to this mounts from beginning. Note: this slows down the boot!
Before=kodi.service


[Mount]
# The share we want mount
What=//openmediavault/hgst4tbv1/data/audio

# Where we want mount this share
Where=/storage/music

# Any options you usually use with the "-o" parameter in the mount command
Options=username=sm0ketst,password=xxxxxxxxxxxxxxxxxxx

# filesystem type
Type=cifs


[Install]
# The target is used by 'systemctl enable <name_of_this_file.mount>' to link
# this service to a runlevel for starting on boot. usually 'multi-user.target'
# is ok here.
WantedBy=multi-user.target

# Important:
# this file must be renamed to <mountpoint>.mount where <mountpoint>, is the FULL path
# where the share will be mounted but slashes "/" MUST BE REPLACED with dashes "-" with .mount
# as extension.
# This means, if we want mount to "/storage/music2" (see above "Where=/storage/music2")
# then this file must be renamed to 'storage-music2.mount' and can be enabled via ssh with the
# command 'systemctl enable storage-music2.mount'

OpenELEC:~ # systemctl enable storage-music.mount
Created symlink from /storage/.config/system.d/multi-user.target.wants/storage-music.mount to /storage/.config/system.d/storage-music.mount.

OpenELEC:~ # cat /storage/.kodi/userdata/addon_data/service.multimedia.mpd/config/mpd.conf | grep music_directory
music_directory "/storage/music"

OpenELEC:~ # reboot
sm0ketst@latitude-6430u:~$ ssh root@openelec.local
root@openelec.local's password: 
##############################################
#                  OpenELEC                  #
#             http://openelec.tv             #
##############################################

OpenELEC (official) Version: 6.0.3

OpenELEC:~ # mount | grep openmediavault
//openmediavault/hgst4tbv1/data/audio on /storage/music type cifs (rw,relatime,vers=1.0,cache=strict,username=sm0ketst,domain=OPENMEDIAVAULT,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.104,unix,posixpaths,serverino,mapposix,acl,rsize=1048576,wsize=65536,actimeo=1)

OpenELEC:~ # tail -n 100 -F  /storage/.kodi/userdata/addon_data/service.multimedia.mpd/log/mpd.log
Jun 08 15:07 : update: added 001.-Electron/0.unclass-albums/absurd minds/106_absurd_minds-solid_steady_changeless-fwyh.mp3
Jun 08 15:07 : update: added 001.-Electron/0.unclass-albums/absurd minds/102_absurd_minds-regain_the_throne-fwyh.mp3
Jun 08 15:07 : update: added 001.-Electron/0.unclass-albums/absurd minds/104_absurd_minds-dependence-fwyh.mp3
[...]



Reference here.