[mythtv-users] BE3 - Issues with installation and database

Barry Martin barry3martin at gmail.com
Wed Jun 5 22:46:48 UTC 2019


Hi Stephen!

(From yesterday’s)

If you want to go ahead and export all the existing recordings from
BE2 to BE3, then you need to first decide how you are going to move
all the recording files to BE3.  How many recordings are there?  Do
you want to move the hard drive(s) with the recording files from BE2
to BE3?  That would probably be the easiest if there are lots of
recordings.  Otherwise, you would first need to ensure that BE3 has
enough space on its recording drives for all of BE2's recordings, plus
space for any new ones it will be making.  Then you would need to set
up network access (using SAMBA?) for BE2 to be able to write files to
BE3's recording drives.  Or you could temporarily install each BE2
recording drive on BE3 to move the recording files.  Or use an
external drive mount to do that.  I will need to know how this is
going to happen in order to do a custom version of mythexport for you.
Also, does BE2 have multiple recording file locations (multiple
directories in its recording storage groups)?  Does BE3 record to any
storage groups other than "Default"?  Does BE3 have multiple recording
drives, or only one?


(From today’s)

Some SQL queries you can run on BE2 and BE3 that can help with all this:
do_mythconverg.sh
# Number of recordings
select count(*) from recorded;
# Total size of recordings in bytes
select sum(filesize) from recorded;
# Total size of recordings in Gbytes
select sum(filesize)/1000/1000/1000 from recorded;
# List of all partitions in all storage groups
select * from storagegroup order by groupname,dirname;
quit

    Glad I procrastinated! The above mythconverg commands makes things a
    lot easier!!


    Run from Backend-3 – the destination box:


    barry at Backend-3:~$ do_mythconverg.sh

    Reading table information for completion of table and column names

    You can turn off this feature to get a quicker startup with -A


    Welcome to the MariaDB monitor. Commands end with ; or \g.

    Your MariaDB connection id is 4816

    Server version: 10.1.38-MariaDB-0ubuntu0.18.04.2 Ubuntu 18.04


    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.


    Type 'help;' or '\h' for help. Type '\c' to clear the current input
    statement.



    MariaDB [mythconverg]> select count(*) from recorded;

    +----------+

    | count(*) |

    +----------+

    | 110 |

    +----------+

    1 row in set (0.00 sec)



    MariaDB [mythconverg]> select sum(filesize) from recorded;

    +---------------+

    | sum(filesize) |

    +---------------+

    | 335301163476 |

    +---------------+

    1 row in set (0.00 sec)



    MariaDB [mythconverg]> select sum(filesize)/1000/1000/1000 from
    recorded;

    +------------------------------+

    | sum(filesize)/1000/1000/1000 |

    +------------------------------+

    | 335.301163476000 |

    +------------------------------+

    1 row in set (0.00 sec)



    MariaDB [mythconverg]> select * from storagegroup order by
    groupname,dirname;

    +----+-------------+-----------+---------------------------------+

    | id | groupname | hostname | dirname |

    +----+-------------+-----------+---------------------------------+

    | 9 | Banners | Backend-3 | /home/barry/Mythtv/banners/ |

    | 5 | Coverart | Backend-3 | /home/barry/Mythtv/coverart/ |

    | 2 | DB Backups | Backend-3 | /home/barry/Mythtv/db_backups/ |

    | 14 | Default | Backend-3 | /home/barry/Mythtv/recordings/ |

    | 7 | Fanart | Backend-3 | /home/barry/Mythtv/fanart/ |

    | 1 | LiveTV | Backend-3 | /home/barry/Mythtv/livetv/ |

    | 11 | Music | Backend-3 | /home/barry/Mythtv/music/ |

    | 12 | MusicArt | Backend-3 | /home/barry/Mythtv/music_art/ |

    | 10 | Photographs | Backend-3 | /home/barry/Mythtv/photographs/ |

    | 8 | Screenshots | Backend-3 | /home/barry/Mythtv/screenshots/ |

    | 4 | Trailers | Backend-3 | /home/barry/Mythtv/trailers/ |

    | 3 | Videos | Backend-3 | /home/barry/Mythtv/videos/ |

    +----+-------------+-----------+---------------------------------+

    12 rows in set (0.01 sec)


    MariaDB [mythconverg]>



    Run from BE2 – the source box:

    (Real name is MythBE2)


    barry at MythBE2:~$ do_mythconverg.sh

    bash: /usr/local/bin/do_mythconverg.sh: Permission denied

    (I had not rebooted the machine following installation, not sure if
    the need for sudo shows anything or a special requirment ro run
    mythimport/mythexport.)

    barry at MythBE2:~$ sudo do_mythconverg.sh

    mysql: [Warning] Using a password on the command line interface can
    be insecure.

    Reading table information for completion of table and column names

    You can turn off this feature to get a quicker startup with -A


    Welcome to the MySQL monitor. Commands end with ; or \g.

    Your MySQL connection id is 21977

    Server version: 5.7.26-0ubuntu0.16.04.1 (Ubuntu)


    Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights
    reserved.


    Oracle is a registered trademark of Oracle Corporation and/or its

    affiliates. Other names may be trademarks of their respective

    owners.


    Type 'help;' or '\h' for help. Type '\c' to clear the current input
    statement.



    mysql> select count(*) from recorded;

    +----------+

    | count(*) |

    +----------+

    | 878 |

    +----------+

    1 row in set (0.02 sec)



    mysql> select sum(filesize) from recorded;

    +---------------+

    | sum(filesize) |

    +---------------+

    | 2513111679220 |

    +---------------+

    1 row in set (0.00 sec)



    mysql> select sum(filesize)/100/1000/1000 from recorded;

    +-----------------------------+

    | sum(filesize)/100/1000/1000 |

    +-----------------------------+

    | 25131.413409200000 |

    +-----------------------------+

    1 row in set (0.00 sec)



    mysql> select * from storagegroup order by groupname,dirname;

    +----+-------------+----------+----------------------------+

    | id | groupname | hostname | dirname |

    +----+-------------+----------+----------------------------+

    | 9 | Banners | MythBE2 | /data3/mythtv/banners/ |

    | 6 | Coverart | MythBE2 | /data3/mythtv/coverart/ |

    | 3 | DB Backups | MythBE2 | /data3/mythtv/db_backups/ |

    | 1 | Default | MythBE2 | /data3/mythtv/recordings/ |

    | 7 | Fanart | MythBE2 | /data3/mythtv/fanart/ |

    | 2 | LiveTV | MythBE2 | /data3/mythtv/livetv/ |

    | 11 | Music | MythBE2 | /data3/mythtv/music/ |

    | 12 | MusicArt | MythBE2 | /data3/mythtv/music_art/ |

    | 10 | Photographs | MythBE2 | /data3/mythtv/photographs/ |

    | 8 | Screenshots | MythBE2 | /data3/mythtv/screenshots/ |

    | 13 | Streaming | MythBE2 | /data3/mythtv/streaming/ |

    | 5 | Trailers | MythBE2 | /data3/mythtv/trailers/ |

    | 4 | Videos | MythBE2 | /data3/mythtv/videos/ |

    +----+-------------+----------+----------------------------+

    13 rows in set (0.00 sec)


    mysql>



    BE2 and BE3 record to only /*/recordings.


    BE2 has three hard drives:

    /dev/sda1 is /data2 WD WDC20EARS – old shows not watched and to be
    discarded

    /dev/sdb1 is root (/) WD WDC800BB

    /dev/sdc1 is /data3 WD WD30EFRX - has MythTV’s recordings



    Samba is available on BE2 but not installed on BE3 – if need will.


    BE3 has one drive: root, MythTV, etc.

    /dev/sda2 is root, and everything else.


    Think I got all your questions answered. Thanks again for all the help!

    Barry







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20190605/b29566bc/attachment.html>


More information about the mythtv-users mailing list