[mythtv-users] Boleslaw's truncated-delete patch

Yeechang Lee ylee at pobox.com
Sat Jun 17 22:04:21 UTC 2006


Boleslaw Ciesielski <bolek-mythtv at curl.com> says:
> So, this confirms that this behavior is not myth specific. I am not
> sure what to do about it though.

Hopefully you or someone else will be able to figure out how to deal
with the cifsxxxx-stub-files-not-going-away issue. Meanwhile, here's what
I've done to automate getting rid of the stubs:

* Install swatch (a utility typically used to watch logfiles for
  suspicious behavior or hardware failures).
* Create /etc/swatch with the following content:

watchfor   /All file truncates are finished/
        exec "rm -rf /misc/cube/mythtv/store/cifs*"

(obviously, substitute the directory your MythTV video files are kept)

* Execute swatch from /etc/rc.d/rc.local this way:

swatch --config-file=/etc/swatchrc --tail-file=/var/log/mythtv/mythbackend.log \
    --awk-field-syntax --tail-args "-F" &

With this approach, the cifsxxxx files won't be deleted unless (and
only unless) all pending MythTV deletions are done and the "All file
truncates are finished" message has just popped up in the mythbackend
log, meaning no cifsxxxx file is being used by the backend any more.

-- 
Yeechang Lee <ylee at pobox.com> | +1 650 776 7763 | San Francisco CA US


More information about the mythtv-users mailing list