nick.rout at gmail.com
Mon Mar 8 06:50:35 UTC 2010
On Mon, Mar 8, 2010 at 8:57 AM, R. G. Newbury <newbury at mandamus.org> wrote:
> On 03/06/2010 02:01 PM, Christopher Meredith wrote:
>> Why put / and /var on different partitions?
> This discussion has been aired on the list a couple of times in the last few
> 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 requirements.
> 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 distros).
> Again, this means that /var can get messed up without my losing anything.
No /var is for storage of highly variably sized data, like log files,
database files (and recordings).
However in myth it makes a LOT of sense to create a dedicated
partition like /mythtv (see knoppmyth for example).
> 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
Why? Linux hardly uses /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.
NO!! /tmp is for stuff that can be thrown away across reboots.
/var/tmp is for temporary data that should survive reboots.
> 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,
you shouldn't need /etc/hosts to contain much if you have dns working.
/etc/resolv.conf should be set on dhcp getting your dns settings.
/etc/fstab is worth keeping IF you want to set up an identical system
next time you reinstall.
> 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.
More information about the mythtv-users