Difference between revisions of "User Manual:MythTV structure"

From MythTV Official Wiki
Jump to: navigation, search
(Input connections)
 
(23 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{Navigate|User Manual:Detailed configuration Backend|User Manual:Index|User Manual:Detailed configuration Frontend}}
+
{{User Manual TOC}}
This page is up-to-date to MythTV version 0.21
+
  
 +
This page is up-to-date to MythTV version 0.21, the current release is {{CurrentRelease}}
 +
 +
For a description of how Storage Groups apply to MythVideo in .22 see [[MythVideo]]
  
 
==Introduction==
 
==Introduction==
  
In the previous chapter we explained about the "general" backend settings. Now we will go into the backend settings involved for setting up your MyhtTV system to watch live television. We will talk about the following configuration items:  
+
The previous chapter explained the "general" backend settings. Settings pertaining to mythbackend which (when properly configured) will allow a MythTV system to watch live and record television will be covered here:  
  
 
# General — General Backend settings (Discussed in the previous chapter)  
 
# General — General Backend settings (Discussed in the previous chapter)  
# Capture Cards — Add and configure your capture devices here  
+
# Capture Cards — Add and configure capture devices here  
 
# Video Sources — create guide data.  
 
# Video Sources — create guide data.  
# Input connections — tell your Capture Card(s) to wich Video Source they should connect
+
# Input connections — Assign EPG data sources to capture cards / video inputs here.
# Channel Editor — scan and configure your channels here  
+
# Channel Editor — scan and configure channels here  
# Storage Groups — Configure which folders your recordings will be saved to.  
+
# Storage Directories — Configure (but not create) directories MythTV uses as storage for the likes of recordings.
 +
# System Events — Configure scripts to be run by event triggers.
  
  
This chapter explaines all the basics but for your convenience we have includded specific chapters in this manual for each type of capture device (See the index of this manual).
+
This chapter explains all the basics but for your convenience we have included specific chapters in this manual for each type of capture device (See the index of this manual).
  
  
==capture cards==
+
==Capture Cards==
  
In order to enable its great flexibility, MythTV uses a very modular approach when it comes to its internal architecture. This - unfortunately? - also means that the MythTV administrator - You! - has to get familiar with this architecture if he/she wants to make the most of his/her system, especially if it contains more than one single capture card!
+
For flexibility, MythTV uses a modular approach to internal architecture. This - unfortunately? - also means that the MythTV administrator - You! - has to get familiar with this architecture to make the most of your system, especially if it contains more than one single capture card!
 
+
The first element in any mythtv system is the capture card(s): capture cards can be actual TV cards (analog or digital), 'Virtual' IPTV cards such as the [[FreeBox]] recorder, or simply video capture cards connected to an external set-top box. All these cards provide a video feed to the system, and receive orders from the system to change their active channel(s), move a satellite dish, simulate a remote key press, you name it. One of the strengths of MythTV is that it allows you to install several capture cards at once on your system, thus allowing you to merge content from many different origins on the same box: DVB, Analog TV, IPTV, etc. Moreover, you can also install several identical -or similar, as long as they receive similar channels- capture cards on the same system, in order to allow recording a program (or several if you install more cards) while watching another.
+
  
 +
The first element in any MythTV system is the capture card(s): these can be actual TV cards (analog or digital), 'Virtual' [[IPTV]] cards such as the [[FreeBox]] recorder, or simply video capture cards connected to an external set-top box. All these cards provide a video feed to the system.  They receive orders from the system to change their active channel(s), move a satellite dish, simulate a remote key press, you name it. One of the strengths of MythTV is that you can install several capture cards on your system and merge content from many different origins on the same box: DVB, Analog TV, IPTV, etc, and to allow recording a program (or several if you install more cards) while watching another.
  
 
==Video sources==
 
==Video sources==
  
'''Video Sources''' define the methods for retrieving Electronic Program Guide data ([[EPG]]) into the system. These sources can be created using [[mythtv-setup]] and then associated with specific [[Capture Cards]] in the [[Input Connections]] screen.  
+
'''Video Sources''' define the methods for retrieving Electronic Program Guide data ([[EPG]]) into the system. These sources can be created using [[mythtv-setup]] and then associated with specific [[User_Manual:MythTV_structure#Capture_Cards|Capture Cards]] in the [[User_Manual:MythTV_structure#Input_connections|Input Connections]] screen.  
  
MythTV knows how to extract EPG from capture cards that support this, but since broadcast EPG data is usually fairly limited in terms of timespan and content, it can also download data from the Internet using ancillary software such as XmlTV. In a typical MythTV setup, you will create one separate source per type of capture card (analog, DVB, IPTV) that is installed on your system. For each source, you will select how the program guide data is fetched, and for what channels this data should be fetched. This can be slightly confusing for many users, as there are many different program grabbers with different capabilities and slightly different behaviors depending on what area in the world you live in. (there is a good chance MythTV will actually request you to get back to the terminal window to manually configure the mapping of Program Guide data and actual channels - more on this later -.)
+
MythTV can extract EPG from capture cards that support this, but since broadcast EPG data is usually fairly limited in terms of timespan and content, it can also download data from the Internet using ancillary software such as XmlTV.
 +
 
 +
In a typical MythTV setup, you will create one separate source per type of capture card (analog, DVB, IPTV) that is installed on your system. For each source, you will select how the program guide data is fetched and for what channels. e.g. XmlTV CableTV Analog Channels, XmlTV CableTV Digital Channels, EPG Free to Air Channels,etc.  This can be confusing for many users, as there are many different program grabbers with different capabilities and slightly different behaviors depending on what area in the world you live in. (there is a good chance MythTV will actually request you to get back to the terminal window to manually configure the mapping of Program Guide data and actual channels - more on this later -.)
  
 
[[Image:Videosourceslist.jpg|thumb|left|400px|Adding a new video source.]]
 
[[Image:Videosourceslist.jpg|thumb|left|400px|Adding a new video source.]]
Line 37: Line 41:
 
<br clear="all" />
 
<br clear="all" />
  
: ''Section [http://www.mythtv.org/docs/mythtv-HOWTO-9.html#ss9.1 9.1] of the manual describes the setup process for video sources.  North American users can choose [[DataDirect]] to supply the schedule information while those outside North America should use [[XMLTV]].  Transmitted guide data ([[EIT]]) can also be used as a source or a supplement to the other sources if it is available. This information is stored in the database as entries in the [[Videosource_table | videosource]] table.''
+
: ''Section [http://www.mythtv.org/docs/mythtv-HOWTO-9.html#ss9.1 9.1] of the manual describes the setup process for video sources.  North American users can choose [[Schedules Direct]] to supply the schedule information while those outside North America should use [[XMLTV]].  Transmitted guide data ([[EIT]]) can also be used as a source or a supplement to the other sources if it is available. This information is stored in the database as entries in the [[Videosource_table | videosource]] table.  '''Note:''' one should almost never enable EIT when using [[Schedules Direct]] in the US.  The (bad) [[EIT]] data provided by most providers will stomp all over the (good) [[Schedules Direct]] data. Also it is highly recommended that if you are using a source with a large number of channels that you remove as many as possible, especially ones you don't receive.''
 
+
  
 
==Input connections==
 
==Input connections==
  
Once you have defined your capture card(s) and Source(s), you will move on to "Inputs": Inputs are where you link one or several capture cards (providing video streams) to a source of program guide data (providing information about the video streams in question). Beware, though: you should not link several different types of capture cards with the same source (for example, a DVB USB dongle + IPTV streaming from your ISP + PCI Analog TV capture card), or MythTV will get totally confused. AFAIK, the only situation where you will link several capture cards with the same source, is when those capture cards are all the same type (eg. all DVB, or all Analog, etc) and are meant to duplicate the number of tuners in order to enable simultaneous recording and watching.
+
Once you have defined your capture card(s) and Source(s), you will move on to "Inputs".
  
As part of creating the Input, you will trigger a channel scan, which should, if all goes well, automatically discover all the available TV channels that are available on your capture card, and also match the channels to Electronic Program Guide data provided by the source. Nevertheless, depending on the program guide grabber that you use, your mileage may vary quite a lot since you will often end up with a slight or big mismatch between TV channel names / CallSign / Number and EPG data identifiers that are stored in the database... No worries, though, it all can be easily corrected in the...
+
Inputs are where you link one or several capture cards (providing video streams) to a source of program guide data (providing information about the video streams in question).  
  
 +
This allows you to define channels that each capture card can record.
 +
 +
Beware, though: you should not link several different types of capture cards with the same source. e.g, a video source for a DVB USB dongle will have one set of channels.  That same set of channels will not be used for IPTV streaming from your ISP or PCI Analog TV capture card.
 +
 +
One situation where you will link several capture cards with the same source is when those capture cards are all the same type (eg. all DVB and they get the same input feed, or all Analog, etc). Sometimes, you will want some same channels in several input connections. For example, if you have a CI/CAM for subscribed TV programs, but the CI is only available for one tuner (but FTA to both), you need to create separate Video Sources for each different channel set, and connect them to the corresponding cards. The identical channels will be listed twice in the channel editor, but only once by the frontend.
 +
 +
As part of creating the Input, you will trigger a channel scan, which should, if all goes well, automatically discover all the available TV channels that are available on your capture card, and also match the channels to Electronic Program Guide data provided by the source. Nevertheless, depending on the program guide grabber that you use, your mileage may vary quite a lot since you will often end up with a slight or big mismatch between TV channel names / CallSign / Number and EPG data identifiers that are stored in the database... No worries, though, it all can be easily corrected in the...
  
 
==Channel Editor==
 
==Channel Editor==
Line 51: Line 61:
 
This last setup screen shows you the result of all the previous steps: a complete list of all the channels that were detected for all the capture cards on your system, along with the name of the EPG source linked to each channel. In the edit dialog for each channel, you will be able to specify if EPG data for the channel should be gathered over the air, or should come from a specific XMLTV program ID. This is where you will see whether your XMLTV grabber correctly identified each channel or not: if not, you will end up with bogus channels with "???" as channel number. If so, simply write down the XMLTV ID for the bogus channel and put this ID in the real channel. You can then delete the bogus channel.
 
This last setup screen shows you the result of all the previous steps: a complete list of all the channels that were detected for all the capture cards on your system, along with the name of the EPG source linked to each channel. In the edit dialog for each channel, you will be able to specify if EPG data for the channel should be gathered over the air, or should come from a specific XMLTV program ID. This is where you will see whether your XMLTV grabber correctly identified each channel or not: if not, you will end up with bogus channels with "???" as channel number. If so, simply write down the XMLTV ID for the bogus channel and put this ID in the real channel. You can then delete the bogus channel.
  
One thing to watch out for, in case several of your capture cards receive similar channels - for example, analog and DVB cards that have some TV channels in common - : you cannot use the XMLTV ID of Source 1 as the XMLTV ID for a channel that belongs to Source 2, even if the channels are the same. This sometimes means that, unfortunately, you will end up duplicating xmltv grabbing for the same channels on each source: if you are reluctant to do this, you can move on to more advanced settings and grab the guide data once, and feed it to several sources, but this is beyond the scope of this introduction.
+
One thing to watch for, in case several of your capture cards receive similar channels - for example, analog and DVB cards that have some TV channels in common - : you cannot use the XMLTV ID of Source 1 as the XMLTV ID for a channel that belongs to Source 2, even if the channels are the same. This sometimes means that, unfortunately, you will end up duplicating xmltv grabbing for the same channels on each source: if you are reluctant to do this, you can move on to more advanced settings and grab the guide data once, and feed it to several sources, but this is beyond the scope of this introduction.
  
 
The last element, and arguably the most important, is the channel: channels in MythTV are identified by quite a few elements: "Channel Name", "Channel Number", "Channel Callsign", not to mention extra info such as channel frequency info, etc. Depending on the type of capture card that you use, some elements are used, and some are not: typically, for DVB channels you will not setup anything in the frequency fields - I am not quite sure whether the channel Callsign, Name or Number or a combination are used to tune the channel with DBV tuners - .  
 
The last element, and arguably the most important, is the channel: channels in MythTV are identified by quite a few elements: "Channel Name", "Channel Number", "Channel Callsign", not to mention extra info such as channel frequency info, etc. Depending on the type of capture card that you use, some elements are used, and some are not: typically, for DVB channels you will not setup anything in the frequency fields - I am not quite sure whether the channel Callsign, Name or Number or a combination are used to tune the channel with DBV tuners - .  
Line 58: Line 68:
  
  
==Storage directories==
+
==Storage Groups==
  
Storage direcotires are lists of directories that are used to hold MythTV recording files. By default, there is only one Storage Group, called "Default".
+
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 box| 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.}}
+
{{Note box| At least one recording directory has to be added to the ''Default'' Storage Group or it will not be possible to watch/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.
+
Additional Storage Groups can be created to store specific recordings in their own directories. Storage Groups are edited via the 'Storage Directories' section of [[mythtv-setup]]. It may be desirable 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.
+
Multiple Storage Groups can also be created 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.
 
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.
Line 72: Line 82:
 
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.
 
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.
+
A special 'LiveTV' Storage Group may also be defined. If a LiveTV Storage Group directory exists, it will be used instead of putting LiveTV recordings in the Default Storage Group, allowing LiveTV recordings to be stored 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.
+
To remove a storage group from the list, highlight it and press the 'D' key. This does not "delete" the files, it only removes the directory as a storage location. If the storage group you wish to remove is not empty (which is likely the case as MythTV balances the load), you can move these files from one storage group to another with a regular filesystem move. The next time MythTV tries to access these files, it will automatically search all available storage groups to locate them.
 +
 
 +
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 more than one directory is 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.
 
* '''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.
Line 81: Line 93:
 
'''Storage groups, expiration, and free space settings'''
 
'''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).
+
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 the "Extra Disk Space" is set 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
 
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
Line 92: Line 104:
  
 
''Documentation initially copied from [http://www.mythtv.org/docs/mythtv-HOWTO-9.html#storagegroups Installing and using MythTV].''
 
''Documentation initially copied from [http://www.mythtv.org/docs/mythtv-HOWTO-9.html#storagegroups Installing and using MythTV].''
 +
 +
==System Events==

Latest revision as of 14:54, 19 May 2013

This page is up-to-date to MythTV version 0.21, the current release is 0.27.3

For a description of how Storage Groups apply to MythVideo in .22 see MythVideo

Introduction

The previous chapter explained the "general" backend settings. Settings pertaining to mythbackend which (when properly configured) will allow a MythTV system to watch live and record television will be covered here:

  1. General — General Backend settings (Discussed in the previous chapter)
  2. Capture Cards — Add and configure capture devices here
  3. Video Sources — create guide data.
  4. Input connections — Assign EPG data sources to capture cards / video inputs here.
  5. Channel Editor — scan and configure channels here
  6. Storage Directories — Configure (but not create) directories MythTV uses as storage for the likes of recordings.
  7. System Events — Configure scripts to be run by event triggers.


This chapter explains all the basics but for your convenience we have included specific chapters in this manual for each type of capture device (See the index of this manual).


Capture Cards

For flexibility, MythTV uses a modular approach to internal architecture. This - unfortunately? - also means that the MythTV administrator - You! - has to get familiar with this architecture to make the most of your system, especially if it contains more than one single capture card!

The first element in any MythTV system is the capture card(s): these can be actual TV cards (analog or digital), 'Virtual' IPTV cards such as the FreeBox recorder, or simply video capture cards connected to an external set-top box. All these cards provide a video feed to the system. They receive orders from the system to change their active channel(s), move a satellite dish, simulate a remote key press, you name it. One of the strengths of MythTV is that you can install several capture cards on your system and merge content from many different origins on the same box: DVB, Analog TV, IPTV, etc, and to allow recording a program (or several if you install more cards) while watching another.

Video sources

Video Sources define the methods for retrieving Electronic Program Guide data (EPG) into the system. These sources can be created using mythtv-setup and then associated with specific Capture Cards in the Input Connections screen.

MythTV can extract EPG from capture cards that support this, but since broadcast EPG data is usually fairly limited in terms of timespan and content, it can also download data from the Internet using ancillary software such as XmlTV.

In a typical MythTV setup, you will create one separate source per type of capture card (analog, DVB, IPTV) that is installed on your system. For each source, you will select how the program guide data is fetched and for what channels. e.g. XmlTV CableTV Analog Channels, XmlTV CableTV Digital Channels, EPG Free to Air Channels,etc. This can be confusing for many users, as there are many different program grabbers with different capabilities and slightly different behaviors depending on what area in the world you live in. (there is a good chance MythTV will actually request you to get back to the terminal window to manually configure the mapping of Program Guide data and actual channels - more on this later -.)

Adding a new video source.
Video source configuration in mythtv-setup.


Section 9.1 of the manual describes the setup process for video sources. North American users can choose Schedules Direct to supply the schedule information while those outside North America should use XMLTV. Transmitted guide data (EIT) can also be used as a source or a supplement to the other sources if it is available. This information is stored in the database as entries in the videosource table. Note: one should almost never enable EIT when using Schedules Direct in the US. The (bad) EIT data provided by most providers will stomp all over the (good) Schedules Direct data. Also it is highly recommended that if you are using a source with a large number of channels that you remove as many as possible, especially ones you don't receive.

Input connections

Once you have defined your capture card(s) and Source(s), you will move on to "Inputs".

Inputs are where you link one or several capture cards (providing video streams) to a source of program guide data (providing information about the video streams in question).

This allows you to define channels that each capture card can record.

Beware, though: you should not link several different types of capture cards with the same source. e.g, a video source for a DVB USB dongle will have one set of channels. That same set of channels will not be used for IPTV streaming from your ISP or PCI Analog TV capture card.

One situation where you will link several capture cards with the same source is when those capture cards are all the same type (eg. all DVB and they get the same input feed, or all Analog, etc). Sometimes, you will want some same channels in several input connections. For example, if you have a CI/CAM for subscribed TV programs, but the CI is only available for one tuner (but FTA to both), you need to create separate Video Sources for each different channel set, and connect them to the corresponding cards. The identical channels will be listed twice in the channel editor, but only once by the frontend.

As part of creating the Input, you will trigger a channel scan, which should, if all goes well, automatically discover all the available TV channels that are available on your capture card, and also match the channels to Electronic Program Guide data provided by the source. Nevertheless, depending on the program guide grabber that you use, your mileage may vary quite a lot since you will often end up with a slight or big mismatch between TV channel names / CallSign / Number and EPG data identifiers that are stored in the database... No worries, though, it all can be easily corrected in the...

Channel Editor

This last setup screen shows you the result of all the previous steps: a complete list of all the channels that were detected for all the capture cards on your system, along with the name of the EPG source linked to each channel. In the edit dialog for each channel, you will be able to specify if EPG data for the channel should be gathered over the air, or should come from a specific XMLTV program ID. This is where you will see whether your XMLTV grabber correctly identified each channel or not: if not, you will end up with bogus channels with "???" as channel number. If so, simply write down the XMLTV ID for the bogus channel and put this ID in the real channel. You can then delete the bogus channel.

One thing to watch for, in case several of your capture cards receive similar channels - for example, analog and DVB cards that have some TV channels in common - : you cannot use the XMLTV ID of Source 1 as the XMLTV ID for a channel that belongs to Source 2, even if the channels are the same. This sometimes means that, unfortunately, you will end up duplicating xmltv grabbing for the same channels on each source: if you are reluctant to do this, you can move on to more advanced settings and grab the guide data once, and feed it to several sources, but this is beyond the scope of this introduction.

The last element, and arguably the most important, is the channel: channels in MythTV are identified by quite a few elements: "Channel Name", "Channel Number", "Channel Callsign", not to mention extra info such as channel frequency info, etc. Depending on the type of capture card that you use, some elements are used, and some are not: typically, for DVB channels you will not setup anything in the frequency fields - I am not quite sure whether the channel Callsign, Name or Number or a combination are used to tune the channel with DBV tuners - .

A page or section should probably be written to describe all this more in detail, but this again is beyond the scope of this intro!


Storage Groups

Storage Groups are lists of directories that are used to hold MythTV recording files. By default, there is only one Storage Group, called "Default".


Important.png Note: At least one recording directory has to be added to the Default Storage Group or it will not be possible to watch/record anything with MythTV.

Additional Storage Groups can be created to store specific recordings in their own directories. Storage Groups are edited via the 'Storage Directories' section of mythtv-setup. It may be desirable 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.

Multiple Storage Groups can also be created 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.

A special 'LiveTV' Storage Group may also be defined. If a LiveTV Storage Group directory exists, it will be used instead of putting LiveTV recordings in the Default Storage Group, allowing LiveTV recordings to be stored on their own filesystem. This is similar to the old MythTV method which used a RingBuffer for LiveTV.

To remove a storage group from the list, highlight it and press the 'D' key. This does not "delete" the files, it only removes the directory as a storage location. If the storage group you wish to remove is not empty (which is likely the case as MythTV balances the load), you can move these files from one storage group to another with a regular filesystem move. The next time MythTV tries to access these files, it will automatically search all available storage groups to locate them.

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 more than one directory is 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 the "Extra Disk Space" is set 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.

System Events