From owner-freebsd-geom@FreeBSD.ORG Sat Jan 28 09:23:48 2012 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55856106566B for ; Sat, 28 Jan 2012 09:23:48 +0000 (UTC) (envelope-from rp_freebsd@mac.com) Received: from asmtpout015.mac.com (asmtpout015.mac.com [17.148.16.90]) by mx1.freebsd.org (Postfix) with ESMTP id 3E3C68FC1C for ; Sat, 28 Jan 2012 09:23:48 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from [192.168.1.3] ([98.210.97.211]) by asmtp015.mac.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0LYI008RG1ZEZ8A0@asmtp015.mac.com> for freebsd-geom@freebsd.org; Sat, 28 Jan 2012 08:23:42 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.6.7361,1.0.211,0.0.0000 definitions=2012-01-28_03:2012-01-27, 2012-01-28, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1201280004 User-Agent: Microsoft-MacOutlook/14.14.0.111121 Date: Sat, 28 Jan 2012 00:23:37 -0800 From: Ravi Pokala To: freebsd-geom@freebsd.org Message-id: Thread-topic: Bootable RAID10 on 9.0-RELEASE Subject: Bootable RAID10 on 9.0-RELEASE X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jan 2012 09:23:48 -0000 Hi folks, I'm putting together a server, and I want to balance performance and reliability by putting everything on a four-disk RAID10 array. +----------+ +----------+ +----------+ +----------+ | da0 | | da1 | | da2 | | da3 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +----------+ +----------+ +----------+ +----------+ Based on past experience with creating mirrored roots on older versions (but with the added complexity of the stripes), I would expect the procedure to look something like this, but I would like confirmation and/or corrections: 1) Install the base system on a spare drive: +-----------------------------------+ | dad0p1 freebsd-boot loader | +-----------------------------------+ | dad0p2 freebsd-ufs / | +-----------------------------------+ | dad0p3 freebsd-swap swap | +-----------------------------------+ | dad0p4 freebsd-ufs /var | +-----------------------------------+ | dad0p5 freebsd-ufs /usr | +-----------------------------------+ 2) Boot said drive to single-user mode. 3) Use `geom part' to create appropriately sized partitions on each of the drives for the RAID. +----------+ +----------+ +----------+ +----------+ | da0p1 | | da1p1 | | da2p1 | | da3p1 | +----------+ +----------+ +----------+ +----------+ | ... | | ... | | ... | | ... | +----------+ +----------+ +----------+ +----------+ | da0pN | | da1pN | | da2pN | | da3pN | +----------+ +----------+ +----------+ +----------+ 4) Load the mirror driver: geom mirror load 5) Create the mirrors: geom mirror label [-b load?] gm0p1 /dev/da0p1 /dev/da1p1 ... geom mirror label [-b load?] gm0pN /dev/da0pN /dev/da1pN geom mirror label [-b load?] gm1p1 /dev/da2p1 /dev/da3p1 ... geom mirror label [-b load?] gm1pN /dev/da2pN /dev/da3pN +--------------------------+ +--------------------------+ | +----------+ | | +----------+ | | gm0p1 | da0p1 |\ | | gm1p1 | da2p1 |\ | | +----------+ \ | | +----------+ \ | | ... | ... |\|\ | | ... | ... |\|\ | | +----------+ \ + | | +----------+ \ + | | gm0pN | da0pN |\|\| | | gm1pN | da2pN |\|\| | | +----------+ \ + | | +----------+ \ + | | \ \|\| | | \ \|\| | | \~~~~~~~~~~~\ + | | \~~~~~~~~~~~\ + | | \ da1pN \| | | \ da3pN \| | | +-----------+ | | +-----------+ | +--------------------------+ +--------------------------+ 6) Load the stripe driver: geom stripe load 7) Create the stripes: geom stripe label gs0p1 /dev/mirror/gm0p1 /dev/gm1p1 ... geom stripe label gs0pN /dev/mirror/gm0pN /dev/gm1pN +--------------------------------------+ | +----------+ +----------+ | | gs0p1 | gm0p1 | | gm1p1 | | | +----------+ +----------+ | +--------------------------------------+ | +----------+ +----------+ | | ... | ... | | ... | | | +----------+ +----------+ | +--------------------------------------+ | +----------+ +----------+ | | gs0pN | gm0pN | | gm1pN | | | +----------+ +----------+ | +--------------------------------------+ 8) Create filesystems on the stripes: newfs -J -U /dev/stripe/gs0p1 ... newfs -J -U /dev/stripe/gs0pN 9) Remount / and /boot to read-write, edit /etc/fstab to change all references to /dev/dad0 to /dev/stripe/gs0, edit /boot.loader.conf to add the loading of the mirror and stripe modules at boot, and change back to read-only. 10) Copy all files from dad0pN to gs0pN. 11) Reboot 12) Victory! Somehow, I suspect I'm wrong. In fact, I really hope I'm wrong - RAID10 is such a common configuration, I expect there must be an easier way. Thanks, rp