<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 01/07/2017 04:31 PM, Craig Huff
wrote:<br>
</div>
<blockquote
cite="mid:CAO0hLGpAKhN9aZh4GyFR2bcj=BkF7H2ajbwWKa6_TkfibVV24A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>
<div>I have my remote frontends set up to use
etherwake when the backend isn't already running.<br>
<br>
</div>
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.<br>
<br>
</div>
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.<br>
<br>
</div>
<div>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.<br>
<br>
</div>
<div>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 :-(.<br>
</div>
<div><br>
</div>
I would appreciate suggestions on how best to fix this.<br>
<br>
</div>
Possibilities I'm considering:<br>
<ol>
<li>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).</li>
<li>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.)</li>
<li>Dredge up my neglected knowledge of automounting to
set them up to automatically mount only when something
actually attempts to access them.</li>
<li>...?</li>
</ol>
</div>
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.<br>
<br>
</div>
Thoughts, anyone?<br>
<br>
--<br>
</div>
Craig.<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
</blockquote>
<br>
nfs is very bad with mounts that are on systems that are not up. I
put all my nfs mounts in fstab as follows<br>
<br>
serenity:/srv/mythtv/video1/ /srv/mythtv/video1 nfs
rw,noauto,users,retry=0 0 0<br>
<br>
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.<br>
<br>
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.<br>
<br>
Peter<br>
</body>
</html>