[mythtv-users] Need help with a frontend that has a chicken vs. egg problem

Peter Bennett cats22 at comcast.net
Sat Jan 7 23:03:52 UTC 2017


On 01/07/2017 04:31 PM, Craig Huff wrote:
> I have my remote frontends set up to use etherwake when the backend
> isn't already running.
>
> I also have them set up to nfs mount /var/lib/mythtv/music and
> /var/lib/mythtv/videos so I can play music and imported videos on the
> frontends while keeping the collections in one place on the backend.
>
> My problem is that the nfs mounts getting stuck because the backend
> isn't up yet.  As a result, I don't get far enough in the bootup to
> start mythfrontend which would trigger sending the etherwake message
> to wake up the backend.
>
> Hence the chicken vs. the egg issue:  I can't do the nfs mounts
> because the backend isn't up yet, but the etherwake message to start
> the backend doesn't get sent because I can't get past the nfs mounts.
>
> Right now I trudge upstairs to start the backend and then back
> downstairs to the frontend I want to watch on and start it up (or send
> out the etherwake messages from something at hand wherever I am --
> smartphone, laptop, ...). Usually those handy devices are upstairs,
> too :-(.
>
> I would appreciate suggestions on how best to fix this.
>
> Possibilities I'm considering:
>
>  1. Add a startup script (upstart/init/systemd) to proactively invoke
>     etherwake to wake up the backend (which will ignore the message if
>     it's already up).
>  2. Add the noauto clause to the nfs mounts in /etc/fstab. (But then
>     I'd have to manually log in and issue mount commands to get them
>     mounted each time.)
>  3. Dredge up my neglected knowledge of automounting to set them up to
>     automatically mount only when something actually attempts to
>     access them.
>  4. ...?
>
> I'm currently leaning towards the first one, but I've already got
> several things going on with startup scripts. I'm not looking forward
> to the fact that I'll either have to rewrite them for systemd when I
> move from Ubuntu 14.04 to 16.04 or just scrap them as too much bother.
>
> Thoughts, anyone?
>
> --
> Craig.
>

nfs is very bad with mounts that are on systems that are not up. I put
all my nfs mounts in fstab as follows

serenity:/srv/mythtv/video1/ /srv/mythtv/video1 nfs
rw,noauto,users,retry=0 0 0

They are not auto mounted and can be user mounted when required. Add the
mount command to your script that wakes the server. In the script first
ping the server until that is successful then issue the mount.

I also have code that prevents the server shutting down when another
machine has a drive mounted from the server, to prevent hangs that
happen if the server shuts down and you are linked to it via nfs.

Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20170107/86bfcc3b/attachment.html>


More information about the mythtv-users mailing list