[mythtv-users] Partitioning

R. G. Newbury newbury at mandamus.org
Sun Mar 7 19:57:07 UTC 2010

On 03/06/2010 02:01 PM, Christopher Meredith wrote:
> On Sat, Mar 6, 2010 at 12:48 PM, Donald J. Organ IV
> <dorgan at donaldorgan.com>  wrote:
>> I am setting up my mythbox today, and I have two hard drives one is 750 GB
>> and the other is 500 GB...what would be the best way to partition them
>> should i put / on the 500 then /var/lib/mythtv on the 750 and /var/lib/mysql
>> on the 500?
> Why put / and /var on different partitions?

This discussion has been aired on the list a couple of times in the last 
few months.

Firstly the type of filesystem you need for the OS is quite different 
than what you want for the video store. Ext3 or ext4 is much better at 
handling large numbers of small files. Xfs however can be tuned so that 
it is much better at handling a small number of large (very large!) 
files. Which is why the best course is to have a small disk for the OS 
and different disks for video storage.
My setup uses 15G (of a 60G drive) for the OS. I am seriously 
considering swapping in a 16G SSD to lower the noise,heat and power 
However there is probably nothing stopping someone from using different 
filesystems on different partitions on the same spindle.

Secondly, /var is where the system sends its messages and logs. The rest 
of / does not change much. Most of us let myth run for weeks at a time. 
If a log file grows enough to fill the partition, your system crashes, 
and generally does enough damage that you cannot recover, or can only do 
so with real difficulty. Having /var on its own partition, insures that 
the *rest* of the OS will remain uncorrupted if that sort of overflow 
crash occurs. Just boot from a livecd, or usb stick equivalent, mount 
the /var partition, and delete some files. Unmount and reboot to your OS.

Thirdly, as a result of the former, it is unsafe to use /var for 
longterm storage of any data. The name is a little misleading. Linux 
tends to treat anything in /var as having no real value. So 
/var/lib/mysql and /var/www/html should not be stored there. I symlink 
those into /home, which is its own partition too. So /home is the home 
of the mythconverg database and the mythweb setup (/var/www/html is 
apache's document root under fedora...no idea where in ubuntu or other 
Again, this means that /var can get messed up without my losing anything.

So, how to partition?
In the latest Fedora and Ubuntu distros, /boot can be ext4. So you no 
longer need a separate /boot. One partition for /, one partition for 
/home, one partition for /var. It is also useful to have a separate 
partition for /usr/local, but it is not necessary, if you remember to 
back your own programs and scripts from /usr/local/sbin. And you may 
want a partition for swap. Symlink /tmp into /var/tmp.
Sizes?  / is 8G, /home is 3G, /var is 2G, /usr/local is 2G, swap is 1G
I use the rest of my sda drive as a dedicated partition for music. 
/dev/sdb1 is /video which presently is about 800G of a 1T drive.

You can use some space under /video for backups of the mythconverg 
database, and even the myth binaries and libraries if you want. I also 
save a copy of /etc so I don't have to remember all the details in 
/etc/hosts, /etc/fstab, /etc/resolv.conf.

The beauty of this sort of setup is that you can do a complete reinstall 
or upgrade while saving all the important info on its own partition, and 
be up and running in short order. Except for a problem with lirc on the 
2.6.32 kernel, I upgraded from fedora 10 to fedora 12, (including the 
dreaded nouveau problem) in about 3 hours yesterday.


         Please let me know if anything I say offends you.
          I may wish to offend you again in the future.

          Tux says: "Be regular. Eat cron flakes."

More information about the mythtv-users mailing list