[mythtv-users] partitioning scheme
Rod Smith
mythtv at rodsbooks.com
Sun Apr 15 00:16:46 UTC 2007
On Saturday 14 April 2007 18:20, matthew.garman at gmail.com wrote:
> I'm about to set up a new hard drive for my parents' MythTV system.
> I'm just wondering what kind of partitioning scheme is the "best"
> for a Myth system?
>
> I know there's no single "best" way, I'm just trying to figure out
> what the pros and cons of doing it one way or the other are.
>
> For every Linux machine I've ever built, I've always used separate
> partitions for /, /boot, /usr, /tmp, /var, /home and swap (swap
> obviously has to be its own partition). But I feel like this may
> not be the most optimal use of space.
As a technical nit-pick, swap does not, in fact, need to go on a separate
partition. You CAN create a swap file in a normal filesystem and add it to
your swap space. This isn't normally something you'd want to do, but it can
be handy as a short-term measure or if you find you need more swap space but
don't want to repartition.
As to your main question, though, it's probably best to keep it simple. On
modern systems, the advantages of splitting off /boot are very minor. AFAIK,
MythTV doesn't do a lot with /tmp, so I wouldn't bother with that.
Likewise /home is likely to get light use; most "user" files go in the MythTV
data directory instead. (Of course, if you wanted to put your MythTV files
in /home/mythtv, it would make sense to split off either /home
or /home/mythtv as a separate partition.) I'm not sure /var is worth
splitting off for a MythTV system (again, unless you put your MythTV data
directory/ies under /var), except as noted below. In fact, I recently had a
problem doing so with an Ubuntu system -- for some reason networking refused
to start when the computer was configured with a separate /var partition. I
don't know if Gentoo would have that problem.
MythTV can produce runaway log files under some conditions. MythArchive can do
this with files it stores in the MythArchive directory tree you specify when
setting up MythArchive, and I believe the main MythTV log file
(generally /var/log/mythtv/mythbackend.log) can do this, too. This is a
reason to split of /var or /var/log, but the MythArchive log file can be
awkward in this respect; you'd need another partition for it, another
partition for MythArchive as a whole (this would need to be about 20GB in
size), or use symbolic links to put the MythArchive log files somewhere they
won't cause too much trouble if they go bonkers. The real potential for
damage is if the runaway log files are on a recording directory; MythTV will
delete recordings when it sees the available disk space shrinking! (I found
this out the hard way.)
You might consider using LVM to ease resizing. Unfortunately, neither JFS nor
XFS can be shrunk, but both ReiserFS and ext3fs can be. All four of these
filesystems can be grown. LVM will also let you expand onto additional disks
in the future, but at the cost of an increased risk of losing all your data
(if one disk fails it's pretty much all gone). The "storage groups" option is
supposed to enable expansion without the use of LVM, but it's only available
in development versions of MythTV, so you might not get it with stock
packages. (I'm running a stock Ubuntu 0.20 version without storage groups.)
In any event, if you use LVM you could leave a bit of space unallocated to
any logical volume so that you can grow any of them in the future if the need
arises.
--
Rod Smith
http://www.rodsbooks.com
More information about the mythtv-users
mailing list