You are not logged in.

#1 2009-06-07 16:34:45

1311219
Member
From: Sweden
Registered: 2007-01-09
Posts: 121

Partitioning suggestions for HTPC?

I'm planing to build an htpc and I simply wanted to hear some suggestions/criticism about my partitioning ideas from fellow archers... wink
(I realise there's been earlier discussions about this, but I hope this topic is ok?)

I'm not looking to compromise system stability/data reliability just for some "rice burning" speed improvements of a few percent, but I would be interesting to optimize the system without hurting the reliability (in other words, no reiser4 or ext4).

1) First of all, the system will mostly be used for recordings (using mythtv), so I'll probably use the same fs for both / /boot and /home, I'm planing to use a 10GB ext3 fs for two reasons: it's well tested, and it can be "upgraded" to ext4 when it becomes stable (as in well tested):
/ (dir_index)

2) I'm also planing to disable automatic fsck after <x mounts>/<y time>, since the journaling should be enough, right? And if the fs gets unmounted uncleanly, it'll still get checked?

3) I'm going to use tmpfs for three directories:
/tmp (noexec, size=1G maybe?)
/var/run  (size=5M)
/var/lock (size=5M)

4) To speed up pacman, I'll use reiser (v3) for /var, maybe 2GB to be able to store some old packages after updating?

5) For storing the recorded shows, I'll create a partition (around 200GB?) using JFS, since it might be a bit more reliable than XFS in crashes?

6) I'll also use noatime and nodiratime for all filsystems.

7) How much swap would I need for suspend-to-swap/hibernation? I'm planing to get 2GiB of ram (more than enough...)

8) While LVM could be useful for some situations, I don't think It'll be useful here.

Any suggestion, theory and personal experience around this would be highly appreciated.

Update: added swap.

Last edited by 1311219 (2009-06-07 19:06:56)

Offline

#2 2009-06-08 00:09:51

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Partitioning suggestions for HTPC?

1311219 wrote:

5) For storing the recorded shows, I'll create a partition (around 200GB?) using JFS, since it might be a bit more reliable than XFS in crashes?

I use XFS for this on my XBMC PC without issues. XFS is good with large files.

1311219 wrote:

7) How much swap would I need for suspend-to-swap/hibernation? I'm planing to get 2GiB of ram (more than enough...)

I believe 1.5 - 2 times the size of RAM is a good guide and what I use. (ie, 3 to 4gb swap with 2gb RAM)

1311219 wrote:

8) While LVM could be useful for some situations, I don't think It'll be useful here.

LVM is definitely useful here -- once you fill your 200gb partition of recordings, you can just throw another physical drive in and:

pvcreate /dev/sdX1
vgextend vgData /dev/sdX1
lvextene --size XXX /dev/vgData/recordings
xfs_growfs /dev/vgData/recordings

Much easier than splitting partitions, or just moving everything to the new drive and decommissioning the old partition.

Offline

#3 2009-06-08 12:24:18

1311219
Member
From: Sweden
Registered: 2007-01-09
Posts: 121

Re: Partitioning suggestions for HTPC?

Thanks for the reply!

There are two primary reasons for why I'm not sure about using LVM, first of all, mythtv provides so called "Storage Groups" to handle several directories for recordings (and the chassis I'm planing to buy can only hold one hdd at a time anyway), second, LVM adds a small layer which can cause performance drops (if I misconfigure it... tongue) and might make it more difficult to work with if I need to recover data (for example, using a livecd, which would requiring setting up LVM from scratch again to access the partitions).

However, I'm not saying it's a bad idea, just that I'm a bit unsure. But assuming I learn to use LVM natively, it would provide a few advantages, such as being able to dynamically add, resize and remove partitions without having to worry about their position. Since it would not be possible to load a kernel/initcpio from LVM, I guess I would use the following setup:
sda1 extended:
   sda5 ext2 20MB
   sda6 LVM 250GB (or more)
   ...

As for large files, both XFS and JFS works good with large files, but I would prefer to use the one with less possibility of data loss, and I've heard XFS caches much data, making a power-failure more risky.

Another thing I've been thinking about is using reiser for / (and not just for /var), since it might provide an equal recovery reliability. It would of course make it more difficult to move to ext4 (well, not that difficult when using LVM...), but it might cause some benefits for the executables (loads to ram faster)? I don't want to start a ext3 vs. reiser flameware, but does anyone happen to have made any comparison?

Offline

#4 2009-06-08 23:04:38

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Partitioning suggestions for HTPC?

1311219 wrote:

There are two primary reasons for why I'm not sure about using LVM, first of all, mythtv provides so called "Storage Groups" to handle several directories for recordings (and the chassis I'm planing to buy can only hold one hdd at a time anyway), second, LVM adds a small layer which can cause performance drops (if I misconfigure it... tongue) and might make it more difficult to work with if I need to recover data (for example, using a livecd, which would requiring setting up LVM from scratch again to access the partitions).

I wasn't aware Myth provided that feature (as I mentioned, I'm running XBMC) so perhaps that could provide the same result for you. I used to think the same about LVM - another layer of "crap" that will make data recovery etc more difficult but once I learnt it, it's pretty easy. As far as a LiveCD goes, you should be able to:

pvscan
vgscan
vgchange -a y /dev/vgXXXX
lvscan

And you should have your block devices in /dev/mapper/ after that.

1311219 wrote:

However, I'm not saying it's a bad idea, just that I'm a bit unsure. But assuming I learn to use LVM natively, it would provide a few advantages, such as being able to dynamically add, resize and remove partitions without having to worry about their position. Since it would not be possible to load a kernel/initcpio from LVM, I guess I would use the following setup:
sda1 extended:
   sda5 ext2 20MB
   sda6 LVM 250GB (or more)
   ...

You don't have to run your whole system on the LVM, I just use it for my data on the HTPC.

Offline

#5 2009-06-09 14:43:39

1311219
Member
From: Sweden
Registered: 2007-01-09
Posts: 121

Re: Partitioning suggestions for HTPC?

Ok, I'll think about using LVM (I'm planing a new encrypted arch install on my normal system, so I'll have to give it a try anyway). But I doubt I'll have much use of it (at least for the current planed myth setup). But thanks anyway! smile

Offline

Board footer

Powered by FluxBB