From owner-freebsd-questions@freebsd.org Tue Jan 15 22:57:30 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6716314998F2 for ; Tue, 15 Jan 2019 22:57:30 +0000 (UTC) (envelope-from merlyn@geeks.org) Received: from mail.geeks.org (mail.geeks.org [IPv6:2001:4980:3333:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D765E7747E for ; Tue, 15 Jan 2019 22:57:29 +0000 (UTC) (envelope-from merlyn@geeks.org) Received: from mail.geeks.org (localhost [127.0.0.1]) by after-clamsmtpd.geeks.org (Postfix) with ESMTP id 83B2F11020B for ; Tue, 15 Jan 2019 16:57:28 -0600 (CST) Received: by mail.geeks.org (Postfix, from userid 1003) id 5CF1711020A; Tue, 15 Jan 2019 16:57:28 -0600 (CST) Date: Tue, 15 Jan 2019 16:57:28 -0600 From: Doug McIntyre To: FreeBSD Questions Subject: Re: ZFS for raid Message-ID: <20190115225728.GA64342@geeks.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 22:57:30 -0000 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 motherboard. 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.