ZFS NAS configuration question

Louis Mamakos louie at transsys.com
Sat May 30 19:06:42 UTC 2009


I built a system recently with 5 drives and ZFS.  I'm not booting off  
a ZFS root, though it does mount a ZFS file system once the system has  
booted from a UFS file system.  Rather than dedicate drives, I simply  
partitioned each of the drives into a 1G partition, and another  
spanning the remainder of the disk.  (In my case, all the drives are  
the same size).  I boot off a gmirror of two partitions off the first  
two drives, and then use the other 3 1G partitions on the remaining 3  
drives as swap partitions.  I take the larger partitions on each of  
the 5 drives and organize them into a raidz2 ZFS pool.

My needs are more relating to integrity of the data vs. surviving a  
disk failure without crashing.  So, I don't bother to mirror swap  
partitions to keep running in the event of a drive failure.  But  
that's a decision for you to make.

It's not too tricky to do the install; I certainly didn't need to burn  
a custom CD or anything.  There are some fine cookbooks on the net  
that talk about techniques.  For me, the tricky bit was setting up the  
geom gmirror, which you could probably do from the fixit CD or  
something.  I just did a normal install on the first drive to get a  
full FreeBSD running, and then "built" the mirrors on a couple of  
other drives, did an install on the mirror ("make installworld  
DESTDIR=/mnt") and then just moved the drives around.  And I did a  
full installation in the 1G UFS gmirror file system, just to have an  
full environment to debug from, if necessary, rather than just a /boot.

Just some ideas..

louie


On May 30, 2009, at 2:41 PM, Dan Naumov wrote:

> Hey
>
> I am not entirely sure if this question belongs here or to another
> list, so feel free to direct me elsewhere :)
>
> Anyways, I am trying to figure out the best way to configure a NAS
> system I will soon get my hands on, it's a Tranquil BBS2 (
> http://www.tranquilpc-shop.co.uk/acatalog/BAREBONE_SERVERS.html ).
> which has 5 SATA ports. Due to budget constraints, I have to start
> small, either a single 1,5 TB drive or at most, a small 500 GB system
> drive + a 1,5 TB drive to get started with ZFS. What I am looking for
> is a configuration setup that would offer maximum possible storage,
> while having at least _some_ redundancy and having the possibility to
> grow the storage pool without having to reload the entire setup.
>
> Using ZFS root right now seems to involve a fair bit of trickery (you
> need to make an .ISO snapshot of -STABLE, burn it, boot from it,
> install from within a fixit environment, boot into your ZFS root and
> then make and install world again to fix the permissions). To top that
> off, even when/if you do it right, not your entire disk goes to ZFS
> anyway, because you still do need a swap and a /boot to be non-ZFS, so
> you will have to install ZFS onto a slice and not the entire disk and
> even SUN discourages to do that. Additionally, there seems to be at
> least one reported case of a system failing to boot after having done
> installworld on a ZFS root: the installworld process removes the old
> libc, tries to install a new one and due to failing to apply some
> flags to it which ZFS doesn't support, leave it uninstall, leaving the
> system in an unusable state. This can be worked around, but gotchas
> like this and the amount of work involved in getting the whole thing
> running make me really lean towards having a smaller traditional UFS2
> system disk for FreeBSD itself.
>
> So, this leaves me with 1 SATA port used for a FreeBSD disk and 4 SATA
> ports available for tinketing with ZFS. What would make the most sense
> if I am starting with 1 disk for ZFS and eventually plan on having 4
> and want to maximise storage, yet have SOME redundancy in case of a
> disk failure? Am I stuck with 2 x 2 disk mirrors or is there some 3+1
> configuration possible?
>
> Sincerely,
> - Dan Naumov
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org 
> "
>



More information about the freebsd-stable mailing list