[mythtv-users] mysql filling up hard drive

Scott Moncrieff scottcmoncrieff at gmail.com
Fri May 8 18:00:18 UTC 2015


Apologies for the misinformation, it was nothing to do with the ssh-agent
file. The computer was not responding so the directory did not update.

When the disk starts to fill up, 6 files appear in /tmp
#sql_4ec_0.MYD
#sql4ec_2a3_0.frm
#sql4ec_2a3_0.MYI
#sql4ec_2a3_1.MYD
#sql_4ec_0.MYI
#sql4ec_2a3_0.MYD
#sql4ec_2a3_1.frm
#sql4ec_2a3_1.MYI

The last 5 characters are different each time.

Backend terminal output is here:  http://pastebin.com/yjQtZwCa

I have cut out the middle of large sections of similar data for clarity but
the drive starts to fill up after the line:

GetPlaybackURL/UNABLE/TO/FIND/LOCAL/FILE/ON/MythtvServer/9703_20150222193800.mpg.
File doesn't exist.  Database metadata will not be removed.

Once the drive has filled up and then the temp files removed, the DB Error
line appears followed by HouseKeeperTask 'DBCleanup' Finished successfully.

I am afraid I am one of the Mythtv 'users' so a bit out of my depth trying
to work out how to solve this.




On 8 May 2015 at 10:05, Scott Moncrieff <scottcmoncrieff at gmail.com> wrote:

> I am not sure that lack of space available to mysql is the problem, the
> drive has nearly 100gb free on it.
>
>
> Regarding the ssh port, is it closed by default? I will check later
> tonight, and also my router logs but I am fairly sure outside access is
> tightly locked down! The reasons that I think it must be related to the
> mythtv database are, I restored a 6 month old system backup and it was fine
> until I imported the current database and iotop shows mysqld is continually
> writing large amounts of data to the drive.
>
>
> On 8 May 2015 at 09:04, Stephen Worthington <stephen_agent at jsw.gen.nz>
> wrote:
>
>> On Fri, 8 May 2015 08:16:16 +0100, you wrote:
>>
>> >On 8 May 2015 at 07:55, Scott Moncrieff <scottcmoncrieff at gmail.com>
>> wrote:
>> >
>> >> Thank you, I will explore all of this but unfortunately not until after
>> >> work tonight!
>> >>
>> >> The drive is not partitioned, the system runs on a 128gb SSD,10.2 gb
>> used
>> >> now I have restored an older system backup and I have 4 x 3TB drives,
>> 1 for
>> >> recordings and 1 for Video library and the other 2 are backups updated
>> >> using rsync.
>> >>
>> >> I have optimised the database tables again (did it last night as well)
>> >>
>> >> From the log it looks like it has been doing this for most of the night
>> >> but has been stable for the last 20 minutes at least, drive just
>> starting
>> >> to fill up now. du shows that it is /tmp/ that is filling up but will
>> >> investigate more tonight.
>> >>
>> >> Scott
>> >>
>> >>
>> >> On 8 May 2015 at 00:36, Nick Morrott <knowledgejunkie at gmail.com>
>> wrote:
>> >>
>> >>> On 8 May 2015 at 00:08, Scott Moncrieff <scottcmoncrieff at gmail.com>
>> >>> wrote:
>> >>> > I managed to get some of the log files off but I am not sure where
>> to
>> >>> start.
>> >>> > The backend is just showing a large number of autoexipre messages
>> >>> followed
>> >>> > by file missing errors.
>> >>> >
>> >>> > mysql error log
>> >>> > http://pastebin.com/QYBVSQgS
>> >>> >
>> >>> > backend
>> >>> > http://pastebin.com/9ncw4MHL
>> >>>
>> >>> Couple of ideas:
>> >>>
>> >>> i) See https://www.mythtv.org/wiki/Mysql for details on fixing
>> crashed
>> >>> tables in the database (once MBE is disabled). You want to start with
>> >>> a healthy database.
>> >>>
>> >>> ii) Check your filesystems to see if any are actually full (esp /var
>> >>> and /tmp). You don't say how your SSD is partitioned, so it's not
>> >>> clear which partition is getting 99% full. It could be that /tmp is
>> >>> filling with temporary tables whilst the scheduler is running and then
>> >>> cleaning up again.
>> >>>
>> >>> You can monitor realtime usage of /tmp (or any other dir) using
>> >>> $ du -hs /tmp/
>> >>>
>> >>> If you run this command in another terminal (alongside Bill's logfile
>> >>> suggestion) whilst mythbackend restarts, you might get to see where
>> >>> the free space is being used.
>> >>>
>> >>> Cheers,
>> >>> Nick
>>
>> >Whilst the drive is filling up, /tmp has a folder ssh-P5Nw6CXpmdb which
>> >contains a single file - agent.1506
>> >
>> >It is this file which has zero bytes and then grows to fill the drive.
>>
>> That temp file seems to belong to a process called ssh-agent.  This
>> command should show it:
>>
>>   ps -ef | grep ssh-agent
>>
>> which gives me this result on Mythbuntu 14.04:
>>
>> stephen   2688  2644  0 00:17 ?        00:00:00 /usr/bin/ssh-agent
>> /usr/bin/dbus-launch --exit-with-session
>> /usr/share/mythbuntu/session.sh
>> root     31900  5318  0 19:54 pts/9    00:00:00 grep --color=auto
>> ssh-agent
>>
>> (that may wrap on many email clients - it is just two lines starting
>> with "stephen" and "root").
>>
>> My understanding is that ssh-agent is supposed to store private ssh
>> keys so they can be re-used without having to log in again for
>> anything that needs to use them, such as tasks run from X.  So you
>> only have to login once while starting the X session, and then
>> anything that is run from the same session (eg a program you start)
>> can use the same keys without having to ask for a login again.
>>
>> Just why it is going rogue, I have no idea.  Do you have the ssh port
>> open to the Internet and is it being attacked???
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20150508/d2fa9ac8/attachment.html>


More information about the mythtv-users mailing list