[mythtv-users] Recovering from transcode/bad seektable
stephen_agent at jsw.gen.nz
Sun Sep 27 04:03:25 UTC 2020
On Sat, 26 Sep 2020 14:04:22 -0700, you wrote:
>Thanks for your very concrete suggestions. Unfortunately, I still can't
>view the video.
>Some details below, and a question: should I regenerate the seek table in
If your root partition has been out of space for a while, the
recordedseek table has probably been corrupt for a while too. Without
enough space the daily or weekly optimize_mythdb will not have fixed
the recordedseek table, and any recordings that were made after it
became corrupt probably have either no or invalid entries in
recordedseek. So you should do mythcommflag --rebuild on all the
recordings since the recordedseek table became corrupt. If you are
lucky you will have complaints from mythbackend about the bad
recordedseek table in the mythbackend.log files to tell you when it
first happened. But if it was too long ago your older logs will have
already been deleted. If you also do commercial flagging, then after
you do mythcommflag --rebuild for a recording, you will also need to
rerun the commercial flagging. You will need to work out what
settings you use for commercial flagging to put on the command line.
I have a small systemd job that checks for sufficient free space for a
second copy of my recordedseek table when it is being checked and
repaired and tells me if my root partition is too low on space, to
avoid getting this problem. It emails me when there is a problem, and
checks every hour:
root at mypvr:/etc/systemd/system# sc cat check-free-space.service
Description=Check free space on /
ExecStart=/bin/bash -c "/usr/local/bin/check-free-space.sh"
root at mypvr:/etc/systemd/system# sc cat check-free-space.timer
Description=Hourly root free space check.
root at mypvr:/etc/systemd/system# cat /usr/local/bin/check-free-space.sh
if [ -z "$1" ]; then
if ! [[ $1 =~ $REGEX ]] ; then
elif [[ $1 -eq 0 ]]; then
root_free_space=$(($(stat -f --format="%a*%S" /)))
echo "Free space on root is $root_free_space"
if [ $root_free_space -lt $min_required ]; then
# Free space too low for /etc/cron.daily/optimize_db to run safely
# mythconverg.recordedseek table.
echo "Free space too low (< $min_required)"
# Free space is sufficient.
echo "Free space is sufficient (>= $min_required)"
root at mypvr:/etc/systemd/system# cat notify-failure at .service
#notify-failure at .service:
Description=OnFailure for %i
root at mypvr:/etc/systemd/system# cat /usr/local/bin/onfailure.sh
# Author: Kyle Manna <kyle at kylemanna.com>
# Simple systemd script used to be called via something like:
# Example Unit section of a service file:
# failure-email at .service:
# Description=OnFailure for %i
# ExecStart=/path/to/onfailure.sh %i
email="root xxxxxx at xxxxxxxxx xxxx at xxxxx"
cat <<EOF | sendmail -i "$email"
Subject: [$HOSTNAME] OnFailure Email for $svc
$(systemctl status -l -n 1000 "$svc")
More information about the mythtv-users