[mythtv-users] Advice on Partitions

Rod Smith mythtv at rodsbooks.com
Wed Mar 4 06:43:13 UTC 2009


On Wednesday 04 March 2009 12:15:28 am Jonno wrote:
> On Tue, Mar 3, 2009 at 10:02 PM, Jonno <jonnojohnson at gmail.com> wrote:
> > I
> > just noticed that the Mythbuntu LiveCD install created a 10GB ext
> > partition (sda1) for everything except /var/lib which it mounted in a
> > 300GB xfs partition (sda6) which it created (obviously expecting that
> > this is where I would store my recordings).
...
> Damnit, scratch all that. I stupidly rebooted after commenting out the
> line in /etc/fstab that mounts sda6 on /var/lib. On reboot it threw me
> out to a command line and I managed to uncomment the line and reboot
> again. However now mythfrontend won't run and even mythtv-setup
> doesn't even run correctly.
>
> Am I totally hosed?!!!
>
> Here is the mythbackend log:
>
> QSqlQuery::exec: database not open
> 2009-03-03 22:31:24.996 Using runtime prefix = /usr
> 2009-03-03 22:31:25.054 DBUserName is not set in mysql.txt
> 2009-03-03 22:31:25.061 DBPassword is not set in mysql.txt
> 2009-03-03 22:31:25.062 DBName is not set in mysql.txt
> 2009-03-03 22:31:25.063 Empty LocalHostName.
> 2009-03-03 22:31:25.068 Using localhost value of jonno-mythbuntu
> 2009-03-03 22:31:25.209 New DB connection, total: 1
> 2009-03-03 22:31:25.276 Connected to database '' at host: localhost
> 2009-03-03 22:31:25.290 Closing DB connection named 'DBManager0'
> 2009-03-03 22:31:25.309 Connected to database '' at host: localhost
> 2009-03-03 22:31:25.312 ERROR: Unable to create schemalock table:
> Driver error was [2/1046]:
> QMYSQL3: Unable to execute query
> Database error was:
> No database selected

I'm not a MySQL expert, but it looks to me as if your MySQL database has 
become damaged or lost. This database normally resides in /var/lib/mysql, so 
when you rebooted without your normal /var/lib partition, MySQL would have 
started up, found no database there, and perhaps tried to create it or done 
something strange. When you restored /var/lib... I'm not sure. If MySQL 
stores all its data in /var/lib, I'd expect it would have recovered OK, but 
if it's squirreled away some data elsewhere, it might have gotten confused by 
the inconsistency. Or perhaps the database became corrupt if, say, you forced 
an unmount when the database was in use. (I'd expect Linux would refuse to 
unmount the partition in which an in-use MySQL database resides, but if you 
tried to force the issue it might have caused some corruption.)

In any event, I suggest you focus on MySQL issues rather than MythTV issues 
per se.

-- 
Rod Smith


More information about the mythtv-users mailing list