[mythtv-users] limiting size of a storage group

Michael T. Dean mtdean at thirdcontact.com
Tue Nov 24 00:52:00 UTC 2009


On 11/23/2009 07:25 PM, Gabe Rubin wrote:
> Is it possible to limit how big a storage group is?  I am running out
> of room on my mythbox but have tons of room on my windows computer.  I
> am considering creating a shared drive on the windows computer,
> mounting it on my windows box, and making that mount point a storage
> group to be recorded to.  However, I want to limit the size so myth
> recordings don't overtake the computer.  Is this possible?
>
> I see that there is a free space setting, but it appears that it
> allocates that much free space for each storage group, so it would
> affect the local storage as well.  I suppose I could create a
> partition on the windows machine dedicated for this purpose, but would
> like to avoid that if possible.

First a bit of terminology so we're on the same page.

A storage group is simply a list of directories.  It has no "size" other 
than the number of directories listed in it.  So, if I have a "Default" 
storage group whose only directory entry is "/srv/mythtv/tv/recordings", 
the "Default" storage group has a size of 1.

The directory specified in the storage group is a file system object 
that exists within a file system.  The directory can generally contain 
other file system objects--including files and other directories.  
However, the directory itself has no size.  The file system on which it 
exists has a size that specifies the amount of storage space provided by 
the file system.

The same directory can be listed in multiple different storage groups.  
Different directories on the same file system can be listed in the same 
/or/ different storage groups.  Different directories on different file 
systems can be listed in the same /or/ different storage groups.

In other words, there is absolutely no correlation between storage 
groups and directories or storage groups and file systems.  A storage 
group is just a list of directories (with a human-readable "logical" name).

OK, now that we're speaking the same language, let's get to your 
question...  :)

The way to limit the amount of space made available to MythTV is through 
file system and/or operating system limits.  The easiest approach to put 
limits on file system usage is the hard limit imposed by the file system 
size itself.  You may do this by partitioning the drive appropriately 
and/or using tools such as LVM to allow you to create file systems of 
the desired size.

There are other options such as quotas or other operating-system 
constraints on disk usage.

As you figured out, the "Extra Disk Space" setting isn't appropriate.  
It specifies a number of gigabytes of storage space that MythTV should 
not use, but is global across /all/ file systems.  Therefore, if you 
have a 200GB file system and a 2TB file system which contain directories 
specified in MythTV storage groups, the same "Extra Disk Space" will be 
applied to both file systems.  So, whereas you may really want MythTV to 
reserve 250GB of disk space for use by other applications on the 2TB 
file system, you certainly don't want Myth to reserve 250GB of disk 
space for use by other applications on the 200GB file system (or, if you 
do, you should not be specifying any directories on that file system in 
your MythTV storage groups).

I'll leave it up to others to suggest whether to use partitioning or LVM 
or quotas or other mechanisms to limit MythTV's usage of the file 
system.  Especially since you're planning to use a Windows-managed file 
system for the storage, the options you have (other than partitioning) 
are well outside my area of experience.

Mike


More information about the mythtv-users mailing list