Storage Groups
From MythTV
Storage Groups are lists of directories that are used to hold MythTV recording files. By default, there is only one Storage Group, called Default.
Note: You need to add at least one recording directory to the Default Storage Group or else you will not be able to record anything with MythTV.
You may create additional Storage Groups to store specific recordings in their own directories. Storage Groups are edited via the 'Storage Directories' section of mythtv-setup. You may want to add multiple directories (which are mounted on different hard drives) to a Storage Group in order to spread out filesystem I/O onto multiple filesystems.
You can also create multiple Storage Groups to group recordings together; recording schedules now have an option to specify which Storage Group to use.
MythTV will balance concurrent recordings across the available directories in a Storage Group in order to spread out the file I/O load. MythTV will prefer filesystems that are local to the backend over filesystems that are remote until the local filesystem has 2 concurrent recordings active or other equivalent I/O, then the next recording will go to the remote filesystem. The balancing method is based purely on I/O, Myth does not try to balance out disk space unless a filesystem is too low on free disk space in which case it will not be used except as a last resort.
Storage Groups are global, but can be overridden on a slave backend by creating a local Storage Group by running mythtv-setup on the slave. If a problem occurs and the slave backend is unable to use the desired Storage Group, it will fail back and try the directories defined in the master's Storage Group.
You can also create a special 'LiveTV' Storage Group. If a LiveTV Storage Group directory exists, it will be used instead of putting LiveTV recordings in the Default Storage Group, allowing you to put your LiveTV recordings on their own filesystem. This is similar to the old MythTV method which used a RingBuffer for LiveTV.
Usage information for all Storage Group directories is visible on the mythfrontend status screen as well as the mythbackend status webpage. MythTV is smart enough to determine which directories are on shared filesystems so it should not count free or used space multiple times if you have more than one directory on the same filesystem.
- Added by Darryl Ross on 2007-03-06: Some details about the algorithm and weighting Myth uses to spread out the recordings across disks in the storage groups is on the Storage Groups Weighting page. Thanks to Chris Pinkham for the details.
Storage groups, expiration, and free space settings
The "global" setting "Extra Disk Space," specifies the amount of extra space to keep available on each filesystem, not a total amount of extra space to keep available across all filesystems. Therefore, if you set the "Extra Disk Space" to 3GB, it should be keeping 3GB available on all filesystems (to which Myth is recording at any particular time).
That parenthetical can actually be very important. If Myth is not recording to a filesystem, it does not autoexpire programs to make room for the data that some other process is writing to that filesystem. Therefore, until a recording starts and is being written to the filesystem in question, no programs will be expired from that filesystem.
History
Introduced in r12151 and first released in 0.21.
Documentation initially copied from Installing and using MythTV.
