[mythtv-users] Samba share of mythfs.py filesystem not working
John Reid
johnbaronreid at netscape.net
Mon Jan 31 09:10:19 UTC 2011
On 29/01/11 19:46, Michael T. Dean wrote:
> On 01/29/2011 09:14 AM, John Reid wrote:
>> On 29/01/11 03:58, Michael T. Dean wrote:
>>> On 01/28/2011 10:24 PM, Raymond Wagner wrote:
>>>> On 1/28/2011 20:54, E. Westbrook wrote:
>>>>> On Fri, Jan 28, 2011 at 08:32, Raymond Wagner wrote:
>>>>>> Yes there is, but the event only provides the channel ID and
>>>>>> start
>>>>>> time. There is not enough information to reconstruct the
>>>>>> filename
>>>>>> to know which link to delete.
>>>>> Wouldn't it be sufficient to determine the filename to pass the
>>>>> format string to mythlink.pl as a command-line argument for the
>>>>> event definition? Or derive it from the mytlink.pl config?
>>>> To be honest, I don't know how that would work. When the system
>>>> event is sent to the connected machines, only the chanid and
>>>> starttime is defined. Normally, the machine can then look up the
>>>> recording to pass on to the registered command, but if the
>>>> recording has been deleted, there will be nothing to look up. The
>>>> easiest option would probably be to just have a 'cleanup' mode,
>>>> where it scans the directory, and removes any dead symlinks.
>>>
>>> Which is basically what running without --chanid/--starttime is...
>>> It cleans up everything, then re-creates.
>> It just seems cleaner and easier to remove only the dead symlinks.
>
> Cleaner, perhaps. Easier, not by a long shot.
>
> And, IMHO, having some links be missing for up to 6/86400 of the day
> is not really a problem (and I have a /lot/ of recordings, so for most
> people a run is likely shorter). Before MythTV System Events, I used
> to run full mythlink.pl jobs 5 times every half hour (creating
> different views) and in the 4+ years I did that, I only twice had
> links disappear out from under me while browsing the directory. A
> daily run would be 48 times less likely to have that problem. And
> note that as soon as you start a command using a link, the link is no
> longer relevant--you can delete the link while the show is playing
> back or copying or whatever, and it won't cause problems (since this
> isn't Windows).
>
>> This is superior to removing all links and recreating as someone
>> might be using the links at the time. If there was an option that
>> makes mythlink do this whilst creating the one new link this could
>> work quite well.
>
> When run using MythTV System Events or User Jobs, it's very likely
> that multiple mythlink.pl processes will be running concurrently,
> since many recordings start or end at the same time. Therefore, do
> you really want every single mythlink.pl that's triggered
> automatically to stumble around a list of links--which are being
> changed underneath it--trying to update it, as another mythlink.pl
> process is updating it.
>
> IMHO, cleanup needs to occur as a separate step--I don't want 4
> mythlink.pl jobs trying to do cleanup every single hour (or half hour)
> during primetime.
>
>> BTW cronjobs don't work too well for me as my machine is off most of
>> the time.
>
> Then have it run at startup or shutdown or whenever seems appropriate,
> or use a cron helper or cron that can handle scheduling jobs even when
> the system is often shut down (like anacron or fcron).
This is possible.
>
> Besides, we have a working solution. IMHO, we should concentrate
> efforts on all the things that don't work or don't have solutions.
It does sound like it didn't work for you at least twice but I agree it
doesn't need to be part of the same run that creates the links, that was
only a suggestion.
John.
More information about the mythtv-users
mailing list