dorian-ny
Posts: 50
Joined: Fri Nov 01, 2019 11:29 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 4:34 am

crooss your fingers and hope for the best.
let us know how it blows

Donnelly
Posts: 24
Joined: Wed Aug 21, 2019 10:54 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 3:02 pm

dorian-ny,

Rerbooted. Fingers crossed.

No joy.

PLEX does not see the share. Closed PLEX.

I then used command: sudo mount -a
No errors.

Started PLEX, and PLEX saw the share and ran movie file(s).

hmmm....next steps?

Thanks,
Dave
Thanks,
Dave

dorian-ny
Posts: 50
Joined: Fri Nov 01, 2019 11:29 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 3:09 pm

damn. the script starts after networking but it is likely networking up simply initializes networking and doesn't wait for it to be accessible.
Will have to modify script to make sure we have network access before mounting.

Donnelly
Posts: 24
Joined: Wed Aug 21, 2019 10:54 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 3:23 pm

dorian-ny,
Ok. Here is something strange.

Prior to the script being implemented, I would navigate to the /mnt/Media/pi folder and see the share contents. When I navigate to /mnt/Media/pi now, there are no contents. Yet, PLEX will play media files from the share. uh?

Thanks,
Dave
Thanks,
Dave

dorian-ny
Posts: 50
Joined: Fri Nov 01, 2019 11:29 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 3:29 pm

The script doesn't do anything other then execute a "mount -a"

Donnelly
Posts: 24
Joined: Wed Aug 21, 2019 10:54 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 3:32 pm

dorian-ny,
ok...but I should be able to see the share contents - right? Maybe a new issue...to be addressed after the mount issue.
Thanks,
Dave
Thanks,
Dave

dorian-ny
Posts: 50
Joined: Fri Nov 01, 2019 11:29 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 3:36 pm

There seems to be a network-online service so

in /lib/systemd/system/mount-network-shares.service replace
After=network.target
with
After=systemd-networkd-wait-online.service
Requires=systemd-networkd-wait-online.service

then execute
sudo sudo systemctl daemon-reload

Donnelly
Posts: 24
Joined: Wed Aug 21, 2019 10:54 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 4:04 pm

dorian-ny,
Will do. Have to step out for a couple of hours. Will adjust when I get back.
Thanks,
Dave
Thanks,
Dave

Donnelly
Posts: 24
Joined: Wed Aug 21, 2019 10:54 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 6:20 pm

doria-ny,
Ok - i'm back.

made suggested change

in /lib/systemd/system/mount-network-shares.service replace
After=network.target
with
After=systemd-networkd-wait-online.service

then executed
sudo sudo systemctl daemon-reload
no errors

then rebooted.
no joy.

using file manager, showed nothing in directory /mnt/Media/pi

then executed sudo mount -a

went back to using file manager, navigated to directory /mnt/Media/pi...now all the files in the share are visible...and media files will play.

Also verified PLEX functions normally.


OPS !! MY BAD !
Then I noticed I did not make the full substitution/correction. I left out "Requires=systemd-networkd-wait-online.service".

So - went back, edited /lib/systemd/system/mount-network-shares.service replaced and verified (!) I made the correct...corrections.

executed sudo sudo systemctl daemon-reload
no errors

rebooted.
no joy.

PLEX does not see or play media files.

Also - now...nothing shows up in /mnt/Media/pi.....? (pls note from above - it did have contents. The script is changing something...??)

next steps?

Thanks,
Dave
Thanks,
Dave

Donnelly
Posts: 24
Joined: Wed Aug 21, 2019 10:54 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 6:58 pm

dorian-ny,
Just for clarity....here is what the script looks like:

[Unit]
Description=mount network shares
After=systemd-networkd-wait-online.service

[Service]
Type=simple

User=root
WorkingDirectory=/home/pi

ExecStart=/bin/mount -a

[Install]
Wantedby=multi-user.target


standing by....
Dave
Thanks,
Dave

dorian-ny
Posts: 50
Joined: Fri Nov 01, 2019 11:29 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 7:25 pm

can you do a
journalctl | grep systemd-net

Donnelly
Posts: 24
Joined: Wed Aug 21, 2019 10:54 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 7:32 pm

yup. done. now...how do i copy to post results here?
Thanks,
Dave

Donnelly
Posts: 24
Joined: Wed Aug 21, 2019 10:54 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 7:46 pm

Results:

Nov 09 10:13:36 PMS systemd-networkd[148]: enumeration completed
Nov 09 10:13:36 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:36 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:37 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:39 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:39 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:39 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:39 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:39 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:39 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:39 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:42 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:42 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:42 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:47 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:47 PMS systemd-networkd[148]: eth0: Gained carrier
Nov 09 10:13:47 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:47 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Nov 09 10:13:49 PMS systemd-networkd[148]: eth0: Gained IPv6LL
Nov 09 10:13:46 PMS systemd-networkd-wait-online[163]: ignoring: Lo
Thanks,
Dave

dorian-ny
Posts: 50
Joined: Fri Nov 01, 2019 11:29 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 11:07 pm

add to line following After=systemd-networkd-wait-online.service
Requires=systemd-networkd-wait-online.service

execute
sudo systemctl daemon-reload

Donnelly
Posts: 24
Joined: Wed Aug 21, 2019 10:54 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 11:08 pm

dorian-ny,
working it....
Thanks,
Dave

Donnelly
Posts: 24
Joined: Wed Aug 21, 2019 10:54 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 11:10 pm

dorian-ny,
that line is already there. Pls see post of 10:58am today for what script currently looks like.
Thanks,
Dave

Donnelly
Posts: 24
Joined: Wed Aug 21, 2019 10:54 pm

Re: How do I mount NAS Network Shares

Sat Nov 09, 2019 11:13 pm

dorian-ny,,,
you have had me execute sudo sudo systemctl daemon-reload.

but in your last post you say: sudo systemctl daemon-reload.

Should there be 1 or 2 "sudo"....in the command?
Thanks,
Dave

dorian-ny
Posts: 50
Joined: Fri Nov 01, 2019 11:29 pm

Re: How do I mount NAS Network Shares

Sun Nov 10, 2019 12:11 am

#sorry sometimes I misspell the correct commands are
sudo sudo systemctl daemon-reload
sudo systemctl enable mount-shares

Donnelly
Posts: 24
Joined: Wed Aug 21, 2019 10:54 pm

Re: How do I mount NAS Network Shares

Sun Nov 10, 2019 12:43 am

No problem.
I running errands.....will be back in a couple of hours or so.

When I get back.......what sequence of steps should I do?
Thanks,
Dave

Donnelly
Posts: 24
Joined: Wed Aug 21, 2019 10:54 pm

Re: How do I mount NAS Network Shares

Sun Nov 10, 2019 2:25 am

dorian-ny,
I am back.
executed both commands.

sudo sudo systemctl daemon-reload
no errors

sudo systemctl enable mount-shares
error: Failed to enable unit: Unit file mount-shares.service does not exist.

I verified the file does exist in the /lib/systemd/system

Rebooted system.

executed commands:
sudo sudo systemctl daemon-reload
no errors

sudo systemctl enable mount-shares
error: Failed to enable unit: Unit file mount-shares.service does not exist.


standing by for next steps.
Thanks,
Dave

Donnelly
Posts: 24
Joined: Wed Aug 21, 2019 10:54 pm

Re: How do I mount NAS Network Shares

Thu Nov 14, 2019 4:07 pm

dorian-ny,
Any suggested next steps?
Thanks,
Dave

Return to “Networking and servers”