From owner-freebsd-current@FreeBSD.ORG Fri Apr 29 08:34:44 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1A28106566B for ; Fri, 29 Apr 2011 08:34:44 +0000 (UTC) (envelope-from matthias.andree@gmx.de) Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by mx1.freebsd.org (Postfix) with SMTP id 2DF438FC16 for ; Fri, 29 Apr 2011 08:34:43 +0000 (UTC) Received: (qmail invoked by alias); 29 Apr 2011 08:08:02 -0000 Received: from g230111047.adsl.alicedsl.de (EHLO apollo.emma.line.org) [92.230.111.47] by mail.gmx.net (mp066) with SMTP; 29 Apr 2011 10:08:02 +0200 X-Authenticated: #428038 X-Provags-ID: V01U2FsdGVkX1/SahteqaTSIgYvjvSabhsSgNAdVXiF8niY5FSZ5+ GE64BumUfgo2ok Received: from [IPv6:::1] (unknown [IPv6:::1]) by apollo.emma.line.org (Postfix) with ESMTP id F2D1F25AD86 for ; Fri, 29 Apr 2011 10:08:00 +0200 (CEST) Message-ID: <4DBA71E0.6050005@gmx.de> Date: Fri, 29 Apr 2011 10:08:00 +0200 From: Matthias Andree User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Mnenhy/0.8.3 Thunderbird/3.1.8 MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <1304035891.5251.7.camel@lenovo> In-Reply-To: <1304035891.5251.7.camel@lenovo> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: Re: Hardware RAID and FreeBSD. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Apr 2011 08:34:44 -0000 Am 29.04.2011 02:11, schrieb Colin Mitchell: > Hello, BSDians. > > I am kind of a n00b to FreeBSD but have had great success and fun with > it so far. > > I have two old Dell servers at home. One has Ubuntu server and is my > web and mail server. The other is FreeBSD, and I run servers for a > video game on it. I really like the FreeBSD server, especially the > ports system, and how well it runs even though it is a 1GHz CPU. > > Anyways, I bought a new lower-end computer that I was hoping to replace > both with. It is a dirt-cheap dual-core AMD that I had built for > $175US. It came with a 500GB HDD, and I would like to get another one > to put in it. Now, I would like to set up as a mirrored RAID setup (I > think). I don't really know much about RAID, but I want to have the same > disk image on both hard drives (in case one fails), and possibly three > if I buy another HDD in the future. Is RAID 1 what I want? I also want > to do SVN on it for my PhD code, as well as back up my Wordpress, > Coppermine, etc... Colin, RAID 1 (or mirroring) is indeed what you want, and additionally you should set up a backup to a separate computer (or additional external disk) in addition to the RAID. You need a backup against accidents such as software faults, RAM or controller faults, operator errors (newfs-ing the wrong partition) and such. rm -rf $foo causes the same damage to a RAID than to a single disk if $foo happens to contain "/". Reconsider if you want SVN for PhD code. I'd personally prefer Git or Mercurial or perhaps Bazaar. Easier to set up and use and backup, and IMNSHO more robust, and you can still set up a central repository in a "server" purpose. > Now, here is where the FreeBSD gurus can chime in. I would like to get > a hardware RAID card to tie it all together. I am also looking for a > cheap one, maybe $30-$60US, if this is even feasible. Anyone have any > suggestions? Any successes? Hardware RAID cards in this price range often implement software RAID (some Linux guys call that Fakeraid) and hide that fact, or they don't support RAID5, or both. The major disadvantage of hardware RAID is that usually only the very same card, possibly with the same firmware version, can read the disks back in case the original RAID controller dies, because the software RAID setups often cannot understand the meta data on the disks that the hardware writes. The disadvantage of software RAID is that it is a bit less convenient and needs some attention for the boot loader and boot partition support (although RAID 1 is easy) -- you still want to be able to boot if the primary disk drive dies (that's the whole purpose of RAID). If you plan to go with three disks later, RAID 5 would be the canonical configuration, it covers up the failure of any one hard disk in the array. Consider possible partitioning now - possibly you want /usr in a separate RAID1 so that you can later back it up and make a RAID5 out of it (possibly in a restore operation to defragment everything) and everything else stays in RAID1. Before you buy used hardware controllers (especially RAID 5), be sure to check the web for benchmarks. Some old hardware RAID adaptors are *way* slower than a halfway decent mobo with software RAID. A friend reported rsync speeds less than 1 MB/s with a hardware RAID 5 on some old aacraid driven board under Linux. He doesn't remember which. A used 3ware controller he got (and uses a different driver) is roughly an order of magnitude faster. > Also, I see a lot of talk on here bout ZFS. Is this something I should > try, instead of the standard UFS? Only if you have several GB of RAM, and be sure to read the ZFS tuning guides in the FreeBSD wiki before even trying it -- so that you know what you're buying before your purchase. :-) For experiments, use a play computer, but beware of ZFS performance, it degrades a lot more than UFS when the volume gets closer to filling up, so be sure to keep sufficient free space. I haven't got sufficient ZFS experience to recommend a maximum fill ratio. I got burnt and am now experimenting with journalling UFS, which seems to be unremarkable (which is good). HTH