[mythtv-users] Disk Space Problem

Michael T. Dean mtdean at thirdcontact.com
Tue Oct 30 18:49:51 UTC 2012


On 10/27/2012 09:39 AM, Peter Bennett (cats22) wrote:
> I noticed recently that some of my recordings are cut short. Upon
> looking at the logs I found some 6 recordings ran out of disk space with
> messages like this.
>
> Oct 24 21:11:44 panther-ux mythbackend[2659]: E TFWWrite
> ThreadedFileWriter.cpp:529 (DiskLoop)
> TFW(/srv/mythtv/video3/recordings/1041_20121024210000.mpg:70): No space
> left on the device for file
> '/srv/mythtv/video3/recordings/1041_20121024210000.mpg'#012#011#011#011file
> will be truncated, no further writing will be done.
>
> All of the file systems are 99% full, but about 30% of the recordings
> are deleted, so can be expired. I had thought that mythtv would
> automatically take care of expiring enough space for new recordings.
> There is nothing on these file systems other than mythtv recordings, so
> it is not caused by some other process filling up space.
>
> This happens when 3 HD recordings take place at one time and they are
> all on the same file system. At that rate it would use about 1 GB every
> 3 minutes.
>
> I am updating the free space specification in the front end from 1 GB to
> 5 GB. What is the recommended value?

Well, 1GB is almost definitely not enough if you plan to record 3 
high-bitrate videos to the same full file system at a time...  5GB gives 
more of a buffer, but for that many at once...

>
> What is the recommended approach for free space?
>
> I also wonder how it is deciding which file system to use. The "Balanced
> Free Space" scheduler is selected, and according to the documentation
> that will allocate recordings on the disk with most free space. Since
> all disks are 99% full, the one with the most free space will randomly
> depend on the size of the last program expired and what was recorded
> since it was expired. I have three files systems of very different sizes
> and I expect it to make more use of the largest file system. I don't
> think this algorithm will achieve that. It may even select a smaller
> file system with nothing expirable on it, and then be unable to complete
> the recording, instead of using another file system which may have many
> expirable recordings available.
>
> Perhaps I should change the expire setting to expire programs a few days
> after deleted, so that a realistic free space will be seen?

The problem isn't the "realistic free space"...

>   Or have I
> misunderstood how the balanced disk scheduler works?
>

It's that users with nearly (or completely) full file systems should 
almost definitely be using either Balanced Disk I/O or Combination 
Storage Group Disk Scheduler, and not Balanced Free Space.

http://www.mythtv.org/wiki/Storage_Groups#Storage_Group_Disk_Scheduler

As you've seen, Balanced Free Space makes little sense when file systems 
are nearly full.

Mike


More information about the mythtv-users mailing list