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:
||No journaling required (so save space and KISS).
||Filesystem which copes well with large files. Can't easily be shrunk so don't under-estimate space requirements for /.
||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 mythbox.co.uk 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