Mythtv – Part VI

STORE RECORDED PROGRAMS ON ANOTHER DISK DRIVE

I recall reading that you can improve the performance of Mythtv by storing your recordings on a separate hard drive. You may ask “why bother?”, since you only watch live TV. But even if you are only watching TV, your hard drive is being used as a “buffer” in case you want to pause or rewind parts of your live program…

The ability to setup multiple hard drives is not intuitive when you first install Mythbuntu (or any Linux distribution for that matter). I can readily think of 2 methods to setup multiple hard drives on your system – each having their own advantages and disadvantages. Please see the following table for more information…

Method Description Advantages Disadvantages
LVM
(Logical Volume Management)
Allows for more “flexible” management of partitions (especially allowing several partitions to be combined into one large partition). In other words, group all hard drives to be recognized as one huge one…

Links: [ LVM Definition]

Useful if you want to combine several smaller-capacity hard drives into a larger partition. A lot of work to do. LVM MUST be setup during initial installation of Linux OS.
Need to use Alternate CD for Mythbuntu, and this install disk is not very user-friendly to use.
Create Partition and then
add partition info to /etc/fstab


(recommended)

Use a program to create a partition, and then edit /etc/fstab file. The filename “fstab” stands for File System Table where partitions (hardware devices) are recognized at “boot-up” thus can be used.

Links: [fstab definition]

Easy to setup. Can use existing version of Mythbuntu (i.e. without having to re-install using the ALTERNATIVE Mythbuntu CD). Easy to modify /etc/fstab. Better suits Mythtv to have recorded programs on separate partition. Requires software to create a partition. Requires editing of /etc/fstab file as “super-user”.

I recommend the second method. In this post, I will show you how to download and install an application called gparted (short for “Gnome Partition Editor). I will then show you how to create a partition for your “other” hard disk drive, and how to edit the /etc/fstab file to have your system recognize and allow you to use this newly added partition upon “boot-up”.

I assume that if you are running Mythtv, then exit the application by pressing <ESC> and indicate that you want to exit. Make the following menu selections:

APPLICATIONS -> SYSTEM -> SYNAPTIC PACKAGE MANAGER

After you enter your password, you will be presented with the “Synaptic Package Manager” window. Click on the “Search” button on the right-hand side, and in the Search dialog box, type gparted and then press <ENTER>

The “gparted” application should appear in a list. Click the check box to select this application for download & install, and then click on the “Apply” button.

After the “gparted” application downloads and installs, then close the “Synaptic Package Manager” window, and make the following selections to launch the “gparted” application:

APPLICATIONS -> SYSTEM -> PARTITION EDITOR

In this application, you can select the hard drive by selecting your hard disk in the list box located near the top right-hand corner of the “gparted” application window. Select the hard drive that you want to partition (don’t select the hard drive that your current Mythbuntu distribution resides!). Write down the device name of the hard disk (for example: /dev/sdb1, /dev/sdb1,etc …) since you will need to know this later when editing the /etc/fstab file…

Highlight the partition, then click on the “Partition” menu in order to create a new partition. You can specify a “primary” partition if you wish (I am assuming that you are using the ext3 file format). When you have made the proper choices, the hard disk should be partitioned and formatted.

After the partition and formatting operation is complete, you can close the “gparted” application window. Although you have created and formatted your partition, you need to have it recognized by fstab (or file system table). The safest way (in my opinion) to do that is to edit the file /etc/fstab.

Here are the instructions for editing the /etc/fstab file:
Open a shell window by making the following selections:

APPLICATIONS -> ACCESSSORIES -> TERMINAL

Use a text editor (in super-user mode) to edit the /etc/fstab file. Below is an example of a command to edit the /etc/fstab in “super-user” mode:

sudo vi /etc/fstab

Add an entry to include the following items (all on the same line, but separated by at least one space or tab):

device_name     /mnt/recordings      ext3      defaults      1      1

Where device_name is that name you wrote down earlier
(like /dev/hdb1, or something like that)…

Save and exit the file, and reboot your computer by making the following selections:

APPLICATIONS -> QUIT

Your computer system should reboot, and then run the Mythtv “front-end”. In the Mythtv menu, make the following selections:

UTILITIES/SETUP -> SETUP -> MEDIA SETTINGS -> ARCHIVE FILE SETTINGS

In the “MythArchive Temp Directory” set it to the /mnt/recordings pathname for your new hard drive. You can also set the “backend” to store your recordings to “/mnt/recordings”.

To do this, you need to stop the Mythtv frontend (Press <ESC> and select Yes for exit), run Mythtv backend by selecting:

APPLICATIONS -> SYSTEM -> MYTHTV BACKEND SETUP

In the backend setup menu, select the menu item: STORAGE DIRECTORIES

Select “Default”, then select “Add New Directory”, and type in the pathname:
/mnt/recordings

Continually press <ESC> until you exit Mythtv backend, then you can start the frontend by selecting:

APPLICATIONS -> MULTIMEDIA -> MYTHTV FRONTEND

That should now allow your extra hard disk drive to store recordings (as well as provide extra space to archive movies onto devices such as DVDs…). I would recommend using a large capacity hard disk (such as 120 GB and upwards) if you intend to constantly record shows…

Have fun!

Advertisements

~ by Murray Saul on February 19, 2009.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: