[mythtv-users] Avoiding hard disk full messages

Brent Bolin brent.bolin at gmail.com
Fri Dec 17 12:52:22 UTC 2010


On Thu, Dec 16, 2010 at 9:59 PM, Michael T. Dean
<mtdean at thirdcontact.com> wrote:
>  On 12/16/2010 09:46 PM, Brent Bolin wrote:
>>
>> On Thu, Dec 16, 2010 at 1:11 PM, Michael T. Dean wrote:
>>>
>>>  On 12/16/2010 02:03 PM, The GUIGuy wrote:
>>>>
>>>> No, they were warnings and I was prevented from performing an update
>>>> that needed 17MB of free space.
>>>>
>>>> I subsequently found a couple of files in /var that I could delete.
>>>>
>>>> I notice /var/mythtv/recordings has a couple of thousand files in it,
>>>> amounting to about 1.6T, yet the recording list in mythtv is empty. I
>>>> would
>>>> have thought the mythtv housekeeping would be more timely?
>>>
>>> Housekeeping does not involve deleting files that aren't in the database.
>>>  Believe it or not, MythTV will not delete files that aren't its own.  :)
>>>
>>> Likely you need to see:
>>>
>>>
>>> http://www.mythtv.org/wiki/Frequently_Asked_Questions#Why_aren.27t_my_new_recordings_showing_up_in_Watch_Recordings.3F
>>>
>>> and if that's not the problem, you should run:
>>>
>>> http://www.mythtv.org/wiki/find_orphans.py
>>>
>>> to verify that the files are not associated with any database metadata.
>>>  If
>>> they're truly orphaned video files, you can then delete them with rm
>>> (which
>>> is easy to do by taking the output of find_orphans.py, putting it in an
>>> editor and using search/replace to change the list of orphaned video
>>> files
>>> (and snapshots) to
>>>
>>> rm /srv/mounts/twotb_1/video/2054_20080225110000.mpg
>>> rm /srv/mounts/myth0_1/video/4122_20101013113500.mpg.png
>>>
>>> etc
>>
>> How do you run this script?
>>
>>
>> root at myth:/home/mythtv# ./find.orphans.py
>> from: can't read /var/mail/MythTV
>> from: can't read /var/mail/socket
>>
>> Can this be run from a putty connection?
>
> You'll need a proper environment (HOME specified such that a good
> $HOME/.mythtv/config.xml exists) and a 0.24+ MythTV with Python bindings.
>
> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

Very nice.  I've been doing home grown scripts for cleanup, but I'm
not a programmer.  As you can see it's cleaned up a bunch of orphaned
files.

With a little awking and while true on the original find.orphans.py output

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vol00-root
                      9.2G  6.0G  2.8G  69% /
none                  3.7G  512K  3.7G   1% /dev
none                  3.7G     0  3.7G   0% /dev/shm
none                  3.7G  116K  3.7G   1% /var/run
none                  3.7G  4.0K  3.7G   1% /var/lock
none                  3.7G     0  3.7G   0% /lib/init/rw
none                  1.0G  452M  573M  45% /var/lib/mysql
none                  9.2G  6.0G  2.8G  69% /var/lib/ureadahead/debugfs
/dev/mapper/vol00-disk1
                      2.2T  2.1T   16G 100% /var/lib/mythtv
/dev/mapper/vol00-disk2
                      1.4T  868G  465G  66% /disk2
/dev/md0               46M   25M   19M  57% /boot
xenbu:/xen            1.5T  1.4T   17G  99% /var/lib/mythtv/xen
===================================================================

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vol00-root
                      9.2G  6.0G  2.8G  69% /
none                  3.7G  512K  3.7G   1% /dev
none                  3.7G     0  3.7G   0% /dev/shm
none                  3.7G  116K  3.7G   1% /var/run
none                  3.7G  4.0K  3.7G   1% /var/lock
none                  3.7G     0  3.7G   0% /lib/init/rw
none                  1.0G  452M  573M  45% /var/lib/mysql
none                  9.2G  6.0G  2.8G  69% /var/lib/ureadahead/debugfs
/dev/mapper/vol00-disk1
                      2.2T  2.1T   36G  99% /var/lib/mythtv
/dev/mapper/vol00-disk2
                      1.4T  866G  466G  66% /disk2
/dev/md0               46M   25M   19M  57% /boot
xenbu:/xen            1.5T  827G  592G  59% /var/lib/mythtv/xen

Thanks


More information about the mythtv-users mailing list