Mount Network Share

Hi all,

I would like to know how to mount an nsf share on my ODROID N2+.
I read and apply this topics without success:
_Mount Network Share - LibreELEC.wiki
_https://kodi.wiki/view/NFS

The following NAS configuration:
_191.168.1.17
_XIGMANAS
_Full address to share: 191.168.1.17/mnt/XL01/Share

systemd definition file

Description=nfs mount script
Requires=network-online.service
After=network-online.service
Before=kodi.service

[Mount]
What=/192.168.1.17/mnt/XL01/Share/
Where=/storage/Share/
Options=
Type=nfs4

[Install]
WantedBy=multi-user.target

Then start it for a test :
CoreELEC:~ # systemctl start storage-Share.mount
Job failed. See “journalctl -xe” for details.

Nov 17 15:45:28 CoreELEC systemd[1]: Mounting storage-Share.mount…
Nov 17 15:45:28 CoreELEC mount[3919]: mount.nfs4: remote share not in ‘host:dir’ format
Nov 17 15:45:28 CoreELEC mount[3918]: mount: mounting 192.168.1.17/mnt/XL01/Share on /storage/Share failed: Invalid argument
Nov 17 15:45:28 CoreELEC systemd[1]: storage-Share.mount: Mount process exited, code=exited, status=32/n/a
Nov 17 15:45:28 CoreELEC systemd[1]: storage-Share.mount: Failed with result ‘exit-code’.
Nov 17 15:45:28 CoreELEC systemd[1]: Failed to mount storage-Share.mount.

Thank’s for your help !!!

Follow the sample:

What=192.168.1.17:/mnt/XL01/Share

Exact :no_mouth:
I modified and now I’ve this
Any idea?

Nov 18 17:05:50 CoreELEC systemd[1]: Mounting storage-Share.mount…
Nov 18 17:05:50 CoreELEC mount[3712]: mount.nfs4: mounting 192.168.1.17:/mnt/XL01/Share failed, reason given by server: No such file or directory
Nov 18 17:05:50 CoreELEC mount[3704]: mount: mounting 192.168.1.17:/mnt/XL01/Share on /storage/Share failed: No such file or directory
Nov 18 17:05:50 CoreELEC systemd[1]: storage-Share.mount: Mount process exited, code=exited, status=32/n/a
Nov 18 17:05:50 CoreELEC systemd[1]: storage-Share.mount: Failed with result ‘exit-code’.
Nov 18 17:05:50 CoreELEC systemd[1]: Failed to mount storage-Share.mount.

You should first get to mount in terminal and then make systemd service.

mkdir -p /storage/Share
mount -t nfs 192.168.1.17:/mnt/XL01/Share /storage/Share

Looks like not exported folder to me.

We’re on the right track :star_struck:

So with your advices Share is mounted. That’s good !
But the mount is unavailable after reboot.
I followed the tutorial (https://wiki.libreelec.tv/how-to/mount_network_share) and created an automount :
_Disable the mount service in systemd
_Create a systemd .automount definition file
_Enable the automount service
_Reload systemd to apply changes
_Test the automount

As a result, the automount doesn’t work fine
Please see below the steps and the results:

mkdir -p /storage/Share
mount -t nfs 192.168.1.17:/mnt/XL01/Share /storage/Share
systemctl start storage-Share.mount
systemctl enable storage-Share.mount
systemctl status storage-Share.mount

● storage-Share.mount - nfs mount script
     Loaded: loaded (/storage/.config/system.d/storage-Share.mount; enabled; preset: disabled)
     Active: active (mounted) since Sun 2023-11-19 07:03:36 UTC; 52s ago
      Until: Sun 2023-11-19 07:03:36 UTC; 52s ago
TriggeredBy: ○ storage-Share.automount
      Where: /storage/Share
       What: 192.168.1.17:/mnt/XL01/Share

systemctl status storage-Share.automount

○ storage-Share.automount - test automount for Share
     Loaded: loaded (/storage/.config/system.d/storage-Share.automount; enabled; preset: disabled)
     Active: inactive (dead) (Result: mount-start-limit-hit) since Sun 2023-11-19 07:01:48 UTC; 4min 31s ago
   Duration: 1min 12.136s
   Triggers: ● storage-Share.mount
      Where: /storage/Share

Nov 19 07:01:33 CoreELEC systemd[1]: storage-Share.automount: Got automount request for /storage/Share, triggered by 3539 (kodi.bin)
Nov 19 07:01:35 CoreELEC systemd[1]: storage-Share.automount: Got automount request for /storage/Share, triggered by 3539 (kodi.bin)
Nov 19 07:01:35 CoreELEC systemd[1]: storage-Share.automount: Got automount request for /storage/Share, triggered by 3539 (kodi.bin)
Nov 19 07:01:47 CoreELEC systemd[1]: storage-Share.automount: Got automount request for /storage/Share, triggered by 3539 (kodi.bin)
Nov 19 07:01:47 CoreELEC systemd[1]: storage-Share.automount: Got automount request for /storage/Share, triggered by 3539 (kodi.bin)
Nov 19 07:01:47 CoreELEC systemd[1]: storage-Share.automount: Got automount request for /storage/Share, triggered by 3539 (kodi.bin)
Nov 19 07:01:48 CoreELEC systemd[1]: storage-Share.automount: Got automount request for /storage/Share, triggered by 3539 (kodi.bin)
Nov 19 07:01:48 CoreELEC systemd[1]: storage-Share.automount: Got automount request for /storage/Share, triggered by 3539 (kodi.bin)
Nov 19 07:01:48 CoreELEC systemd[1]: storage-Share.automount: Got automount request for /storage/Share, triggered by 3539 (kodi.bin)
Nov 19 07:01:48 CoreELEC systemd[1]: storage-Share.automount: Failed with result 'mount-start-limit-hit'.

:roll_eyes:

In CE under settings enable “wait for network” or something like that.

I seen in CE. There is this option “Wait for network”.
The value is 10s.

However, after each reboot Share is no available.

For example, with Putty, I run after reboot:
systemctl status storage-Share.mount

The result is:
× storage-Share.mount - nfs mount script
Loaded: loaded (/storage/.config/system.d/storage-Share.mount; enabled; preset: disabled)
Active: failed (Result: exit-code) since Sun 2023-11-19 07:52:34 UTC; 8min ago
TriggeredBy: ● storage-Share.automount
Where: /storage/Share
What: 192.168.1.17:/mnt/XL01/Share

Nov 19 07:52:35 CoreELEC systemd[1]: Mounting storage-Share.mount…
Nov 19 07:52:34 CoreELEC mount[3445]: mount.nfs4: mounting 192.168.1.17:/mnt/XL01/Share failed, reason given by server: No such file or directory
Nov 19 07:52:34 CoreELEC mount[3431]: mount: mounting 192.168.1.17:/mnt/XL01/Share on /storage/Share failed: No such file or directory
Nov 19 07:52:34 CoreELEC systemd[1]: storage-Share.mount: Mount process exited, code=exited, status=32/n/a
Nov 19 07:52:34 CoreELEC systemd[1]: storage-Share.mount: Failed with result ‘exit-code’.
Nov 19 07:52:34 CoreELEC systemd[1]: Failed to mount storage-Share.mount.

I have to white this commands again to mount Share :exploding_head:

mkdir -p /storage/Share
mount -t nfs 192.168.1.17:/mnt/XL01/Share /storage/Share
systemctl start storage-Share.mount
systemctl enable storage-Share.mount

Regarding the automount, I add this one, just to try:
[Unit]
StartLimitIntervalSec=0

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.