[message reformatted to comply with RFCs]

On Tue, 17 Nov 2009 04:18:43 PST
Per Ekstr?m <pelle.ekstrom at gmail.com> wrote:

> I have a question regarding how to parttion my harddrives right, to
> avoid the need of a new installation soon again. I have 3 * 1Tb
> Samsung-drives attached to a motherboard with only 3 S-ata
> connections, and wanna use the space as much as possible. My
> thoughts is to use this computer as a fileserver and want to use it
> for storing photos, movies and so on. Thats why I want to use
> multiple disks, to get the possibility to for example have 1 disk
> crashing, and the others to still store data until I replace the
> damaged one....some kind of RAID, but I'm unsure if thats what it's
> called when it comes to ZFS-filesystem...?
>
> So my question is, how do I set up my installation? Should i make 1
> separate partition on one of the three Samsungdrives, to use for the
> Operatingsystem itself and the rest for storage, or how does this
> work, how should I partition when installing? I even had one thought
> about installing the operatingsystem to a separate USB-stick and
> boot it from there (because the lack of more S-ata contacts), but
> feels like I probably lose some speed from there......right?

One of the best things about zfs and zpool - at least from the
sysadmin perspective - is that it breaks the relationship between
physical partitions on the disk and file systems. People who complain
that this is a design error aren't seeing the big picture. Every file
system I've dealt with before required the sysadmin to create disk
partitions that were then joined together (or not) via striping,
mirroring, etc. to create fixed sets of blocks on which you'd create
file systems. So if I needed to add a file system - for instance, to
create a place to have an new os installed, or to set a block size to
be suitable for a new database's storage, or whatever - I had to
either keep unused partitions available, or repartition things to
create the unused partitions to provide blocks for that file
system. The former was a waste of space, and the latter was a major
pain.

Not with zfs and zpool. They allow you to create zfs file systems on
the fly, each having their own set of properties as file systems. So
you can skip the "create disk partitions for file systems" step in
setting up a system. Instead, you want to partition the set of disks
into zpools, where each zpool preferably contains whole disks that are
going to remain together for the life of the data on them. That's
because once you've put a disk in a zpool, you can only remove it if
it's mirrored. Otherwise, all you can do is replace it.

With that in mind, and knowing you want to be able to survive a disk
crash, I'd say there's two good ways to divide your three disks up:

1) Make them all a single raid. You probably want to use raidz, which
will give you 2 TB of space and let you survive a single disk
failure. You could use raidz2, which can survive two disk failures,
but that only leaves you with 1TB of storage. That doesn't seem to be
in line with your goals.

2) Create two pools: One for the OS consisting of a single disk, and
the other pair a mirror for your data. This will survive a single disk
failure in the mirror, but die if the OS disk dies. Again, you get 2TB
of space, but only half of it will survive crashing. In exchange, you
can move your mirror to another system without having to deal with the
OS file systems should that prove desirable. You could replace the
mirror with a two-disk raidz, but the mirror should provide better
performance and the same reliability.

       <mike
-- 
Mike Meyer <mwm at mired.org>           http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

Reply via email to