[mythtv-users] Advice on Partitions

Jonno jonnojohnson at gmail.com
Wed Mar 4 05:15:28 UTC 2009


On Tue, Mar 3, 2009 at 10:02 PM, Jonno <jonnojohnson at gmail.com> wrote:
> I just reinstalled Mythbuntu 8.10 from scratch (long story, wish I hadn't).
> Anyhow, the Mythtv install is on the primary 320GB drive with my
> recordings stored in an xfs partition (sdb1) on an external 1TB eSATA
> drive mounted on /var/lib/mythtv/recordings. I want to use the 320GB
> drive as a backup store for pictures, home video and music. However 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).
>
> First I am wondering why the Mythbuntu folks put the entire /var/lib
> on an xfs partition rather than just /var/lib/mythtv. Is there
> something else in /var/lib that could benefit from the xfs file system
> other than the recordings?
>
>
> If the answer to the question above is yes then I guess I'm ok with
> creating a directory in /var/lib to put my backup files although I was
> kinda thinking it would be nice to have those in my home directory.
>
> If the answer to the question above is no, then I would like to remove
> sda6 and expand the sda1 to take up the rest of the 320GB drive.
> However I'm a bit nervous about how to do that without screwing
> something up.
>
> Would this be an appropriate order to do things:
> Exit mythtv and stop the backend
> cp -r /var/lib /temp/var/lib
> umount sda6
> cp -r temp/var/lib /var/lib
> Remove the line from /etc/fstab that mounts sda6 on /var/lib
> Reboot into Gparted LiveCD
> Delete sda6 partition
> Resize sda1 partition
> Reboot
> rm -rf /temp/var/lib
>

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

2009-03-03 22:31:25.318 Current Schema Version: (none)
2009-03-03 22:31:25.324 DataDirectProcessor::FixProgramIDs() -- begin
2009-03-03 22:31:25.325 New DB DataDirect connection
2009-03-03 22:31:25.332 Connected to database '' at host: localhost
2009-03-03 22:31:25.340 DB Error (Fixing program ids in recorded):
Query was:
UPDATE recorded SET programid=CONCAT(SUBSTRING(programid, 1, 2),
               '00', SUBSTRING(programid, 3)) WHERE length(programid)
= 12
Driver error was [2/1046]:
QMYSQL3: Unable to execute query
Database error was:
No database selected

2009-03-03 22:31:25.342 New DB connection, total: 2
2009-03-03 22:31:25.348 Connected to database '' at host: localhost
2009-03-03 22:31:25.349 DB Error (Clear setting):
Query was:
DELETE FROM settings WHERE value = 'BackupDBLastRunStart' AND hostname is NULL;
Driver error was [2/1046]:
QMYSQL3: Unable to execute query
Database error was:
No database selected

2009-03-03 22:31:25.356 DB Error (SaveSettingOnHost query failure: ):
Query was:
INSERT INTO settings (value,data,hostname ) VALUES (
'BackupDBLastRunStart', '2009-03-03 22:31:25', NULL );
Driver error was [2/1046]:
QMYSQL3: Unable to execute query
Database error was:
No database selected

2009-03-03 22:31:25.364 DB Error (StorageGroup::StorageGroup()):
Query was:
SELECT DISTINCT dirname FROM storagegroup WHERE groupname = 'DB
Backups' AND hostname = 'jonno-mythbuntu'
Driver error was [2/1046]:
QMYSQL3: Unable to execute query
Database error was:
No database selected

2009-03-03 22:31:25.372 New DB connection, total: 3
2009-03-03 22:31:25.380 Connected to database '' at host: localhost
2009-03-03 22:31:25.388 SG(DB Backups) Error: Directory value for
Default Storage Group is empty.  Using hardcoded default value of
'/var/lib/mythtv/recordings'
2009-03-03 22:31:25.542 Backing up database to file:
/var/lib/mythtv/recordings/--20090303223125.sql
2009-03-03 22:31:25.703 DBUtil Error: Error backing up database:
mysqldump --defaults-extra-file='/tmp/mythtv_db_backup_conf_3qwyFQ'
--host='localhost' --user='' --add-drop-table --add-locks
--allow-keywords --complete-insert --extended-insert --lock-tables
--no-create-db --quick '' >
'/var/lib/mythtv/recordings/--20090303223125.sql' 2>/dev/null (512)
2009-03-03 22:31:25.705 DB Error (Clear setting):
Query was:
DELETE FROM settings WHERE value = 'BackupDBLastRunEnd' AND hostname is NULL;
Driver error was [2/1046]:
QMYSQL3: Unable to execute query
Database error was:
No database selected

2009-03-03 22:31:25.708 DB Error (SaveSettingOnHost query failure: ):
Query was:
INSERT INTO settings (value,data,hostname ) VALUES (
'BackupDBLastRunEnd', '2009-03-03 22:31:25', NULL );
Driver error was [2/1046]:
QMYSQL3: Unable to execute query
Database error was:
No database selected

2009-03-03 22:31:25.713 No current database version. Auto upgrading
2009-03-03 22:31:25.715 Newest Schema Version : 1214
2009-03-03 22:31:25.716 ERROR: Unable to create schemalock table:
Driver error was [2/1046]:
QMYSQL3: Unable to execute query
Database error was:
No database selected

2009-03-03 22:31:25.720 Couldn't upgrade database to new schema


And here is my mythfrontend log:

Starting mythfrontend.real..
2009-03-03 22:16:40.774 ERROR: Unable to create schemalock table:
Driver error was [2/1046]:
QMYSQL3: Unable to execute query
Database error was:
No database selected

2009-03-03 22:16:40.776 Unexpected DB Schema version.  Waiting to see
if DB is being upgraded.
2009-03-03 22:16:41.776 ERROR: Unable to create schemalock table:
Driver error was [2/1046]:
QMYSQL3: Unable to execute query
Database error was:
No database selected

2009-03-03 22:16:42.777 ERROR: Unable to create schemalock table:
Driver error was [2/1046]:
QMYSQL3: Unable to execute query
Database error was:
No database selected

2009-03-03 22:16:43.778 ERROR: Unable to create schemalock table:
Driver error was [2/1046]:
QMYSQL3: Unable to execute query
Database error was:
No database selected

2009-03-03 22:16:44.779 ERROR: Unable to create schemalock table:
Driver error was [2/1046]:
QMYSQL3: Unable to execute query
Database error was:
No database selected

2009-03-03 22:16:45.780 ERROR: Unable to create schemalock table:
Driver error was [2/1046]:
QMYSQL3: Unable to execute query
Database error was:
No database selected

2009-03-03 22:16:45.781 Timed out waiting.
2009-03-03 22:16:45.781 This version of MythTV requires an updated
database schema. Please run mythtv-setup or mythbackend to update your
database.


More information about the mythtv-users mailing list