[mythtv-users] Adding second HD, how to move Myth database over?

Magnus magnus at yonderway.com
Tue Oct 14 15:48:49 UTC 2008

Bobby Gill wrote:
> I currently have a 320gb drive partitioned as root, home and mythrecordings.
> I want to add a second hd (have an old 40gb IDE laying around) and am
> wondering what the right course of action is.

Before you do anything else, read up on LVM2, get comfortable with it,
and put it into practice when you add your second hard disk.

The database itself is easy to move...

* Partition and format a filesystem on your 40G drive
* Mount the 40G drive at a temporary mount point
* Stop the mythtv processes
* Stop mysqld
* rsync -avp /var/lib/mysql/ ${TMPMOUNTPOINT} # the database must be
down for this to work
* mv /var/lib/mysql /var/lib/mysql.old
* mkdir /var/lib/mysql
* chown mysql.mysql /var/lib/mysql
* chmod 755 /var/lib/mysql
* mount /dev/hda1 /var/lib/mysql # replace hda1 with your 40G drive
* start mysqld
* check the logs and make sure mysql started ok
* start mythtv processes

You're also going to want to add this mount point to /etc/fstab.  After
you're sure everything is working ok, you can 'rm -rf /var/lib/mysql.old'.

Doing it this way requires no changes in settings to mysql or to mythtv.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20081014/30c8eb19/attachment.pgp 

More information about the mythtv-users mailing list