# Fileserver with zfs



## donnex (Dec 23, 2008)

Hello, I'm thinking about setting up a file server running FreeBSD and zfs.

I've read the wiki about zfs and I understand that zfs still is experimental and could cause problems if the box is not tuned correctly. The file server won't be a production server and it's not super mega important that it's rock stable, still no one likes kernel panics.

I've read the docs about zfs and played around a bit with a virtual machine where everything seemed to run fine.

The box must be able to handle one disk crash at a time so I'm thinking about going for raidz (raid5). I still need to be able to add disks later but I know it still isn't possible to expand or to remove drives from a raidz in zfs so therefor I'm thinking about the following setup.

Initially buy a few large disk (4-6) and set them up using raidz in a zpool. Later when I need more space I'll buy 3 disks at a time and add them to the zpool in a new raidz so that my zpool will contain my initial big raidz and a bunch of smaller (3 disk) raidz.

zpool:
  raidz:
    disk1
    disk2
    disk3
    disk4
    disk5
  raidz2:
    disk6
    disk7
    disk8
  raidz3:
    disk9
    disk10
    disk11
etc....

Now, I've never tried this setup in a live environment so I don't really know how it'll work.

Do you think still solution will be a good one or do you have any other setup recommendation for what I'm trying to setup?


----------



## phoenix (May 14, 2009)

The situation will work just fine.  Our backups servers use 3 separate raidz3 vdevs, each consisting of 8 drives.  ZFS stripes the data across all three vdevs, creating a RAID0 array of the three RAID6 arrays.

I've also played around with creating a single raidz2 vdev, using it for awhile, then adding extra raidz2 vdevs a couple weeks later.  Works fine.

That's the whole point of the pooled storage setup.    Just keep adding vdevs as time goes by.


----------

