[mythtv-users] How to retire a slave backend

Michael T. Dean mtdean at thirdcontact.com
Mon May 23 22:24:59 UTC 2011


On 05/23/2011 02:32 PM, Jan Ceuleers wrote:
> Hello.
>
> I am trying to retire a slave backend. I used to have a master backend
> without any tuners, and a combined frontend and slave backend with all
> the tuners. I have since migrated my tuners to the master backend and
> now want to retire the old fe/sbe, since I have also pressed a new fe
> into service.
>
> However, many of the recordings show up as being unavailable on the new
> frontend while the old fe/sbe is down. Note that all recordings are
> located on the master backend: the old fe/sbe was diskless.
>
> I am using storage groups (or at least I think I am).
>
> I'd be grateful for any hints.
>
> (using 0.24 from the mythbuntu repos).

3 steps are required to (properly) retire a backend system:

1) Start mythtv-setup on the to-be-retired backend system and go to 
Capture Cards and select "Delete all capture cards on <hostname>" (use 
the "on <hostname>" option so you leave your cards on the other backends 
defined).  Or, if you're physically moving cards to other hosts (and, 
therefore, need to re-connect all inputs to get them in the right 
order), this will be taken care of when you do the "Delete all capture 
cards" (to delete all cards from all hosts) before re-creating cards and 
re-connecting inputs).  See, also, 
http://www.gossamer-threads.com/lists/mythtv/users/264034#264034 .

2) Still in mythtv-setup on the to-be-retired backend system, go into 
Storage Directories, and Delete each Storage Group (select the group and 
hit DELETE (by default, 'D')).  If you've configured your system such 
that you've only defined Storage Groups on the master backend (and did 
not override any SG directory lists on remote backends), this step will 
be unnecessary.  Note, though, that since MythVideo requires an explicit 
override of the Videos SG on each host, you probably have overrides that 
need deleting.

3) Update your database to tell mythbackend that a new host now owns the 
recordings from the to-be-retired backend host:

mysql -umythtv -p mythconverg -e "UPDATE recorded SET hostname = 
'new_hostname' WHERE hostname = 'old_hostname';"

(fixing the host names as necessary).  Eventually, we will have code 
that makes step #3 unnecessary.  Currently, there's no code in MythTV to 
allow doing this, so you have to edit the DB directly--which means you 
take all the risks that doing so entails, so 
http://www.mythtv.org/wiki/Database_Backup_and_Restore .  (In truth, I'd 
recommend a backup before/between making any of the above modifications 
just in case you make a mistake.)

Mike


More information about the mythtv-users mailing list