Myth BOX
The home of guides for Myth TV, IPTables, and other linux based phenomena.
HD version
General guides
Channel setup
Home automation
Product overview
Useful links
SD version
General guides
DVB Card
Myth TV
Broadband modem
Wireless network
Network shares
Network IDS
Extra security
EPIA specific guides
TV-Out cables
Audio/USB cables
Wireless network
EPIA Kernel
Openchrome drivers
Surround sound
Online store
Prebuilt mythbox
Useful links

Partitioning your Mythbox HD

Setting up your partitions correctly from the start goes without saying, but it can be easy to miss layout issues which later become a headache. Take for example XFS. Given that it has a proven track record of dealing with large files efficiently and video files are generally large, it is an ideal choice for using in your Mythbox HD. However, one key drawback of XFS is its inability to be shrunk without the labourious work-around outlined below. It is also worth considering whether XFS is necessarily the best choice for your base linux install, which will house many small files rather than large files.

Taking on board the above factors, the following partition layout was chosen:

Parition Mount point Filesystem Rationale
/dev/sda1 /boot ext2 No journaling required (so save space and KISS).
/dev/sda2 swap swap  
/dev/sda3 /mnt/store xfs Filesystem which copes well with large files. Can't easily be shrunk so don't under-estimate space requirements for /.
/dev/sda4 / ext4 Journaling support and good all round support for mixture of file sizes. Btrfs would have been chosen but it's a little immature at this stage.

Aside making backups a little easier to manage by segmenting your data, the above layout also gives you the freedom to create a secondary install which is useful if you want (or need) to install another base linux.

  • I've ignored the above advice and now I have an XFS partition that I need to shrink!
    Although XFS doesn't support shrinking of the filesystem directly, there is a work around if you have the time. If you use gparted (or Parted Magic containing gparted) you can copy an XFS partition's filesystem to a smaller XFS partition.

    For instance, assuming you have an external hard drive with a 100GB XFS partition on /dev/sdb1. Your internal hard drive contains a 200GB XFS partition /dev/sda3 but it only contains 60GB of files. In this case you can copy the XFS filesystem on /dev/sda3 to /dev/sdb1, delete /dev/sda3, recreate /dev/sda3 as a 150GB XFS partition, then copy back from /dev/sdb1 to /dev/sda3!

    At the time of writing had submitted a patch to gparted which has been accepted. This fixes an issue where due to some overzealous checking the XFS copy functionality was inaccessible. Version 0.10.0 and before were affected.