[mythtv-users] Adding an SSD to my MBE -- partitioning question
R. G. Newbury
newbury at mandamus.org
Mon Feb 13 22:47:04 UTC 2012
On 02/13/2012 10:30 AM, Mark Lord wrote:
> On 12-02-13 09:32 AM, Mark J. Small wrote:
>>
>> In previous discussions about SSD's some folks suggested moving /tmp off the
>> SSD to keep it from wearing out, especially when there isn't a lot of spare
>> RAM to help mysql when the scheduler is run. I was planning on using some of
>> the unpartitioned space on sdb for this.
>
> Your mechanical drives will be long dead and replaced at least once or twice
> before you ever wear out a modern SSD (assuming the SSD doesn't hold recordings).
>
> Most important thing to do: ensure each partition on the SSD is aligned to
> an even power of two. Eg. partition-1 should start at sector 64,
> rather than the (old) default of sector 63.
>
> And no need to bother with a separate /boot partition.
It is actually a 2048 sector alignment which works best. See here:
http://randomtechoutburst.blogspot.com/2010/03/4k-alignment-for-disks-important.html
Recent distro releases have started to use gpt partitioning (Fedora 16).
If you want to continue to use the old-style (ms-dos) partition
methodology, you should partition your new drive BEFORE commencing the
installation.
Use gparted or such from a 'rescue disk' or USB key. I prefer
System-Rescue-CD. What you want to see when you are done is something
like this:
sfdisk -uS -l
Disk /dev/sda: 7297 cylinders, 255 heads, 63 sectors/track
Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/sda1 * 2048 51206143 51204096 83 Linux #this is 'root'
/dev/sda2 51206144 92166143 40960000 83 Linux # home
/dev/sda3 92166144 110598143 18432000 83 Linux # /usr/local
/dev/sda4 110598144 117229567 6631424 83 Linux # /var
Note that the start sectors are all divisible by 2048. The '-uS' tells
sfdisk to report in sectors not cylinders or bytes.
As to HOW you should partition, this is my thinking (and see above!)
Root will get updated and amended. You may want/need to re-install.
Home will NOT get formatted or updated and can carry forward through
many updates. Just create the same user each time
/usr/local contains your myth programs and personal scripts Does not get
formatted on upgrade
/var : where all the logging goes. If your system breaks and starts
logging thousands of reports, it is not fatal to the system if the 'var'
partition fills up. Things will still run, but odd things will happen
since the system cannot write to /var. Delete some files and things will
go back to normal. If you fill '/', you will likely end up re-installing
as things can get ugly (not saying you cannot recover but it will not be
easy).
Because /var is sacrificial, I put /var/lib/mysql and /var/www in
/home/mythtv and put symlinks in their places. Again, var can be wiped
clean without destroying your data. And myth CAN write lots of error
messages if things go pear-shaped.
I have 4G RAM and dispense with a swap partition, both here on the
desktop and on the mythbox.
The tv recordings are saved to /video on a 1TB /dev/sdb1 partition,
along with copies of the important stuff. I save a copy of the installed
/etc, /home/mythtv/, /usr/local, and /root. I cron a backup of the
mythconverg database to /video early every morning.
/dev/sda partitions all use ext4. /video uses xfs with
'alloc-size=512M'. That switch pre-allocates a half Gig at a time for a
file being recorded. This means that the file goes down in contiguous
half Gig chunks on the disk. Helps reduce fragmentation.
Geoff
More information about the mythtv-users
mailing list