[mythtv-users] Can I limit the disk space recordings use?

Mike Perkins mikep at randomtraveller.org.uk
Mon Jul 27 10:15:51 UTC 2009


ryan patterson wrote:
> On Sun, Jul 26, 2009 at 4:06 PM, Richard
> Morton<richard.e.morton at gmail.com> wrote:
>> I really want to understand, why dont you want Myth just to use whats
>> available (minus a buffer)?
>>
>> R
> 
> There are several reasons.  The simplest reason is, that I want to
> know how much of the partition is actually in use and how much is free
> when I use the 'df' command, etc.  If I used your method myth would
> fill up the partition with 3+TB of recordings in the "deleted" group
> and the OS wouldn't see that as free space.
> 
> Also I would have to manually limit how much of the remaining space I
> use for other files in order to keep myth from randomly deleting
> stuff.  I want myth to always use 1.5TB leaving 2.5TB for other files.
>  But if I accidentally copy more then 2.5TB onto the drive then I wont
> necessarily get a "disk full" message.  Instead myth will just delete
> all my recordings to make room.  That is absolutely not what I want.
There seems to be a fundamental misunderstanding here. If you want myth to use 
1.5TB of disk space, and no more, make a 1.5TB partition and have done with it. 
There's no way that myth will use any more from anywhere else. Also: if this is 
space dedicated to myth, you shouldn't be putting anything else in there.

Using 'df' to find out how much disk space is available on a myth partition is a 
waste of time, as you will never know from moment to moment what's been 
recorded, and what's been deleted. If you set the system up as it should be 
used, it will only delete off stuff that's (i) the oldest and has been watched 
and is allowed to expire or (ii) has been specifically deleted. It will manage 
it's own partition space as it requires with no help from you.

There's another point here: the files that myth creates are usually quite large 
as such things go. It's not a good idea to mix them with the typical small files 
that exist on the rest of your system. This means optimising your partitions to 
make best use of the space. I set mine up as ext3 with largefiles4, others use 
other filesystem types to achieve the same end. Multi-gigabyte files and text, 
document and other similar types just don't mix efficiently on one disk.

-- 

Mike Perkins



More information about the mythtv-users mailing list