Mythtv partitioning

Discussion topics, Linux related - not requests for help

Moderators: ChrisThornett, LXF moderators

Mythtv partitioning

Postby bobthebob1234 » Mon Jan 09, 2012 1:17 pm

Ok say one had a 2tb drive lying around and one wanted to put it in ones mythtv box cos it keeps deleting old stuff. What recommendations would one receive as per the partitioning of said device?

Also one would like to keep all the recordings and database (well at least the recording rules and recorded programs) one currently has.

Currenty ones PVR is running (Myth)buntu 10.10. This will updated to whatever version is the must current. One has lost track...
mythbackend --version gives
Code: Select all
MythTV Version   : v0.24.1-96-ge89d6a9
MythTV Branch    : fixes/0.24
Network Protocol : 63
Library API      : 0.24.20110505-1
QT Version       : 4.7.0
Options compiled in:
 linux profile using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_dvb using_firewire using_frontend using_hdhomerun using_hdpvr using_iptv using_ivtv using_joystick_menu using_lirc using_mheg using_opengl_video using_opengl_vsync using_qtdbus using_qtwebkit using_v4l using_x11 using_xrandr using_xv using_bindings_perl using_bindings_python using_mythtranscode using_opengl using_vdpau using_ffmpeg_threads using_live using_mheg


Also ones pvr randomly decides not to record anything (well it tries to but the recordings are 0bytes :( ). A reboot cures this but it means one has to wait until Saturday to watch yesterdays Sherlock and One has missed 500 days of summer. One is not a happy bunny about this situation. Will running the latest version cure this or does one need to open a topic in `Help' about this?
For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was
User avatar
bobthebob1234
LXF regular
 
Posts: 1369
Joined: Thu Jan 03, 2008 9:38 pm
Location: A hole in a field

Postby Dutch_Master » Mon Jan 09, 2012 1:48 pm

Elaborate on 'partitioning'... Am I to understand that said 2 TB device is a 1:1 replacement for the current drive, or does it act as a backup of some sort? I assume the former. What other hardware is present in said box?

Linux, and thus MythTV, thrives in the presence of RAM. Expand it to fill all available slots to max. capacity. And make sure the swap-space on the harddrive is at least twice the total size of RAM available. Partitioning: create a 500MB /boot, at least 10 GB for / with separate partitions for /usr (8 GB), /var (10 GB) and /temp (9 GB, twice the size of a DVD). Add swap space as indicated, then have the remainder for /home, assuming that's where MythTV stores the data it records. Otherwise, adjust to suit :) All partitions can be ext3, except of course swap, and the location where MythTV stores its data: that partition should be XFS or JFS (in that order). Under specific circumstances one could try btrfs on this partition, but it might not be mature enough and I don't know how it performs with large files.

Next, set up a backup facility (file-server) and a cronjob on the MythTV box to transfer recordings to be preserved after viewing, then deletes said recording from the MythTV box.
Dutch_Master
LXF regular
 
Posts: 2440
Joined: Tue Mar 27, 2007 1:49 am

Postby bobthebob1234 » Mon Jan 09, 2012 2:09 pm

The box has 4gb (2x2gb) ram and at the moment 250gb hard drive. I want to swap this for the 2tb one so that I can fit more recordings and videos (films) on it.

At the moment myth stores videos, pictures, music, etc in /var/lib/mythtv but I assume this can be changed. I have no idea where it stores the db (its a mysql db) but apparently something does a weekly backup of this and puts it in /var/lib/mythtv. I didn't know about XFS, but that seems like a good idea!

I don't mind it deleting old stuff, but I would like time to watch it first! Also don't have the budget to buy/run a file server :( I'm a poor student

What are the benefits of having different partitions for / usr/ var/ & temp/?
I was thinking of 4 prehaps, swap, boot, /, and the myth stuff

Cheers
For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was
User avatar
bobthebob1234
LXF regular
 
Posts: 1369
Joined: Thu Jan 03, 2008 9:38 pm
Location: A hole in a field

Postby Dutch_Master » Mon Jan 09, 2012 2:20 pm

Note the use of capitals, there's a distinct difference between upper and lower case: bit vs byte is a factor 8 ;)

Anyway, 4 GB should suffice and you'd have a swap of 8 GB, that's fine. Having separate partitions prevents a runaway process filling all available space (log files!) and thus has less impact on performance. It's a scheme advocated for servers by Debian, who are usually very sensible in this kind of proposals ;)

If you put the MythTV data elsewhere, make sure all applications that need access to it (including MythTV itself) has read/write access to that.
Dutch_Master
LXF regular
 
Posts: 2440
Joined: Tue Mar 27, 2007 1:49 am

Postby nelz » Mon Jan 09, 2012 3:03 pm

MythTV uses storage groups, so you can add drives without resorting to the likes of LVM. Add the drive, partition it, mount it somewhere with a meaningful name (I keep all MythTV files under /storage) then run mythtv-setup and add that mount point to the default storage group, which probably contains one directory at the moment.

If you want to remove the other drive later, you can simply move files from its recording directory to another. MythTV only records the file name of a recording in its database, not the full path, so it will find it as long as it is somewhere in your storage group.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8470
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby Dutch_Master » Mon Jan 09, 2012 3:12 pm

It's probable the box only has room for a single drive Nelz. Replacing the 250GB disk with a 2 TB one, and in the process updating to the latest MythTV version, makes sense then ;)
Dutch_Master
LXF regular
 
Posts: 2440
Joined: Tue Mar 27, 2007 1:49 am

Postby bobthebob1234 » Mon Jan 09, 2012 6:09 pm

The box is a MSI media live, and does have room for two disks, however with just the one it gets very hot some times...

And yes the idea was to replace the 250GB with the 2TB and upgrade at the same time (I have always preferred doing clean installs rather than upgrades)

However I didn't know about the storage groups! Good to know. Thanks
For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was
User avatar
bobthebob1234
LXF regular
 
Posts: 1369
Joined: Thu Jan 03, 2008 9:38 pm
Location: A hole in a field

Postby wyliecoyoteuk » Mon Jan 09, 2012 7:10 pm

I keep my files on a separate XFS partition.
The sig between the asterisks is so cool that only REALLY COOL people can even see it!

*************** ************
User avatar
wyliecoyoteuk
LXF regular
 
Posts: 3452
Joined: Sun Apr 10, 2005 10:41 pm
Location: Birmingham, UK

Postby nelz » Mon Jan 09, 2012 10:27 pm

I too use XFS, because it was what was recommended years ago and I can't be bothered changing it. XFS was always the filesystem of choice when handling large files, but is there any reason to keep using it instead of ext4 nowadays?
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8470
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby wyliecoyoteuk » Tue Jan 10, 2012 7:35 pm

Apart from the fact that I would have to move all of my files, not really, I suppose.
With current Hard disk prices, My 320Gb disk will do me for a while yet.
When they drop back to previous levels, I might upgrade, but to be honest, it never gets very full anyway, as I delete most stuff after one viewing.
The sig between the asterisks is so cool that only REALLY COOL people can even see it!

*************** ************
User avatar
wyliecoyoteuk
LXF regular
 
Posts: 3452
Joined: Sun Apr 10, 2005 10:41 pm
Location: Birmingham, UK

Postby nordle » Tue Jan 10, 2012 10:33 pm

Have upgraded from 200GB to 500GB disk in the past using a method very similar to this chap:

http://encodable.com/tech/blog/2006/10/ ... ve_Upgrade

And being Linux, it booted the new hard disk (using the old data, once Grub had been installed) and even though the disk was different, the processor different, the mobo, chipset etc etc It just cracked on.

Try that on Windows and....well, just dont, you wont get far.

:)
I think, therefore I compile
User avatar
nordle
LXF regular
 
Posts: 1500
Joined: Fri Apr 08, 2005 9:56 pm


Return to Discussion

Who is online

Users browsing this forum: No registered users and 0 guests