ZFS for raid
merlyn at geeks.org
Tue Jan 15 22:57:30 UTC 2019
On Tue, Jan 15, 2019 at 03:48:33PM -0600, Paul Schmehl wrote:
> I read here recently that zfs can be used for raid. I'm a neophyte when it
> comes to zfs, but I'm thinking about using it for the next server I get.
> If you're going to setup drives with zfs for raid, do you need a hardware
> controller? My impression is that you don't, but I want to know for sure
> before I order a server.
> If there's no raid controller, can you setup raid using zfs during the OS
> install? If you boot from the cd/dvd, do you get the option to configure
> raid using zfs?
ZFS can provide you all functions that a hardware RAID setup would.
A hardware controller can come in different options & setups. To me,
I'd be looking for a server with a dedicated HBA (Host Bus Adapter) that
just does IT (initiator target) mode.
If you have a small enough # of disks, you could get away with not
having an HBA at all, and just use the SATA ports provided on the
This would let me connect several to many disks to the server as a
JBOD (just bunch of disks), and use FreeBSD ZFS to manage them.
Sometimes JBOD refers to an external shelf of disks as well.
Hardware Controllers can come as IR mode too, or a "hardware RAID
card". This basicly just runs a small kernel on an embedded CPU on
the HBA that does some sort of RAID on its own, and presents a logical
drive all RAIDed together to the OS.
If you have FreeBSD do all the RAID stuff with ZFS though, you get
more direct control of the disks, you can do direct monitoring for
disk faults and replacement instead of through the hardware RAID card
interface (which often times hide this from you, and there may be some
fault you don't know about or can't monitor). I'd rather have the
power of FreeBSD controlling my RAID vs. a small embedded CPU running
on a hard.
If you are buying a "server class machine", they typically don't
provide many SATA ports onboard, instead expecting their users to be
buying HBAs for their needs. This of course adds onto the cost of the
machine if you have to buy an HBA card to control things. They tend to
be a bit more cost than a simple $30 SATA card or whatever. Desktop machines
tend to have a lot of SATA ports onboard though.
I won't get into SAS vs. SATA.
Yes, you can fully setup ZFS during FreeBSD install for the boot
setup. Typically for my servers, I'd usually have a couple small SSDs
mirrored for boot, and then more data disks for data storage. During
initial setup, you'd be setting up the boot zpool, and deal with the
data zpool later. You can also do a single pool for boot and the rest
if you want, I prefer them to be seperate.
More information about the freebsd-questions