[mythtv-users] Adding another backend, and moving the master server to it?

Brad DerManouelian myth at dermanouelian.com
Fri Aug 10 15:05:10 UTC 2007


On Aug 10, 2007, at 3:10 AM, Paul wrote:

> I will be keeping the two backends, as I do not have enough PCI  
> slots in
> the new machine for all the cards, and I also have dedicated feeds  
> from
> the TV aerial to the cards in the existing server making reception  
> good.
> If they went under the TV they would need to be split form the same  
> feed
> which would affect some of the weaker channels.

I just swapped my master/slace backends around so this is fresh in my  
mind.

> Questions:
>
> 1. Is there an easy way to move the database and main backend onto  
> the new
> machine? (it has a Ahtlon X2 45w CPU, and is much better suited to
> commflag than the 1.7g celeron in my little server, more memory too).

Backup/restore the mysql database according to the wiki instructions.
http://www.mythtv.org/wiki/index.php/Backup_your_database

> I have read some wiki and list articles, but nothing is clear, I  
> assume I
> do  a backup/restore but will this retain commflag and recording  
> details
> completely? (assuming I copy files to new video location as well as DB
> restore) and is there any manual hacking of tables to replace  
> references
> to the old host name with the name of the new machine? (apart from
> settings table obviously)

I just went through the database manually and switched around the  
stuff that I wanted to change like commflag, transcode settings, etc.  
like this:

(Note: Do not blindly issue mysql commands if you don't know exactly  
what it's going to do. Don't blame me if you hose your database.)

mysql> select * from settings where value like 'Job%' and hostname =  
'slave';
+-----------------------------+-------+----------+
| value                       | data  | hostname |
+-----------------------------+-------+----------+
| JobAllowCommFlag            | 1     | slave    |
| JobAllowTranscode           | 1     | slave    |
| JobAllowUserJob1            | 0     | slave    |
| JobAllowUserJob2            | 1     | slave    |
| JobAllowUserJob3            | 1     | slave    |
| JobAllowUserJob4            | 1     | slave    |
| JobQueueCheckFrequency      | 15    | slave    |
| JobQueueCPU                 | 1     | slave    |
| JobQueueMaxSimultaneousJobs | 2     | slave    |
| JobQueueWindowEnd           | 23:59 | slave    |
| JobQueueWindowStart         | 00:00 | slave    |
+-----------------------------+-------+----------+
11 rows in set (0.07 sec)

mysql> update settings set data = 0 where value = 'JobAllowCommFlag'  
and hostname = 'slave';

If you literally want to swap all settings, you can do this (assuming  
your current slave and master are called 'slave' and 'master'):

mysql> update settings set hostname = 'newmaster' where hostname =  
'slave';
mysql> update settings set hostname = 'slave' where hostname = 'master';
mysql> update settings set hostname = 'master' where hostname =  
'newmaster';

Just make sure you adjust your IP addresses in mysql.txt on your  
frontend(s) and also run mythtv-setup to make sure your IP addresses  
are correct there. I think that's all I did to swap my machines.

> 2. Should I leave things as they are and upgrade to 0.21 with storage
> groups to allow me to add the new space into the current system?

That's a big decision since there is no stable release of 0.21, yet.  
It would mean compiling from source or use "bleeding" packages. Both  
of which are in a state of flux and require that you join the -dev  
list and keep current on the state of the code so when things break,  
you are aware of them instead of asking what's wrong.

If your only goal is to increase storage capacity, you can do so with  
LVM or some other extended storage solution like that. You can also  
let each backend record to their own hard drives and the system will  
be smart enough to stream the recordings from the correct machine. I  
chose to put all my drives in a big noisy case in the basement and  
NFS mount the space to my Livingroom (slave) backend so it stays cool  
and quiet. I just find it easier to keep all my recordings in the  
same directory.


More information about the mythtv-users mailing list