Devo studiare questo nuovo metodo: http://wiki.openelec.tv/index.php/Mounting_network_shares#Systemd_NFS_sample_mount, diverso dal “vecchio” FSTAB.
Creare un servizio chiamato mount_point.mount :
[Unit] Description=test nfs mount script #Network mounts *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 Before=kodi.service [Mount] #The share we want mount What=192.168.0.31:/movies #Where we want mount this share Where=/storage/movies #Any options you usually use with the "-o" parameter in the mount command Options= #Filesystem type Type=nfs [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.
Slashes “/” MUST BE REPLACED with dashes “-” with .mount as extension. This means, if we want mount to “/storage/music” (see above “Where=/storage/music”) then this file must be renamed to ‘storage-music.mount’. This is only for the filename! not for the What= and Where= sections!
Enabling the NFS mount
This mount can then be enabled via ssh with the command
systemctl enable storage-movies.mount