From owner-freebsd-hardware@FreeBSD.ORG Wed Dec 19 07:50:20 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AD9516A420 for ; Wed, 19 Dec 2007 07:50:20 +0000 (UTC) (envelope-from rp_freebsd@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.68]) by mx1.freebsd.org (Postfix) with ESMTP id 400CB13C455 for ; Wed, 19 Dec 2007 07:50:20 +0000 (UTC) (envelope-from rp_freebsd@mac.com) Received: from mac.com (asmtp010-s [10.150.69.73]) by smtpoutm.mac.com (Xserve/smtpout005/MantshX 4.0) with ESMTP id lBJ7UMf7029133 for ; Tue, 18 Dec 2007 23:30:22 -0800 (PST) Received: from [192.168.1.2] (c-71-202-238-97.hsd1.ca.comcast.net [71.202.238.97]) (authenticated bits=0) by mac.com (Xserve/asmtp010/MantshX 4.0) with ESMTP id lBJ7UK0S019039 for ; Tue, 18 Dec 2007 23:30:21 -0800 (PST) User-Agent: Microsoft-Entourage/11.3.6.070618 Date: Tue, 18 Dec 2007 23:30:20 -0800 From: Ravi Pokala To: "freebsd-hardware@freebsd.org" Message-ID: Thread-Topic: Questions about gmirror Thread-Index: AchCEQJEQJOqRq4EEdy18wAX8sWzkw== Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Subject: Questions about gmirror X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2007 07:50:20 -0000 Hi everybody, I hope this is the right list for these questions. If not, please accept my apologies and point me to the proper forum. I recently set up a server with 6.2-RELEASE. The machine has two hot-swappable SATA drives at /dev/ad4 and /dev/ad6. Adapting the instructions I found here: http://www.bsdforums.org/forums/archive/index.php/t-45047.html I enabled drive-level (as opposed to slice-level or partition-level) mirroring with gmirror using the following commands: sysctl kern.geom.debugflags=16 gmirror label -v -b round-robin gm0 /dev/ad4 sed -i .orig 's%/dev/ad4%/dev/mirror/gm0%' /etc/fstab echo geom_mirror_load="YES" >> /boot/loader.conf I then rebooted, and started building the mirror with: gmirror insert gm0 /dev/ad6 The mirroring completes, and everything is grand. Now come the questions: (1) What is the procedure for swapping out a dead drive while the system is online? (2) Say a drive dies as a result of a power event, and does not respond to probing during the subsequent boot. Once I swap out the drive, (how) can I get the system to re-probe, recognize the new drive, and start reconstruction? (3) Will the stock bootloader and kernel be able to boot from just ad6 if ad4 dies, or is ad4 special because it was the original boot drive? (Or is this a function of the BIOS?) (4) Say I have two identical machines Foo and Bar, and four identical drives A, B, C, and D. I insert drive A into machine Foo as /dev/ad4 and install 6.2-RELEASE. I then insert drive B into Foo as /dev/ad6 and mirror using the procedure described above. When mirroring completes, I shut Foo down. Can I then pull drive B out of Foo:/dev/ad6 and install it in machine Bar:/dev/ad4, install drives C and D as /dev/ad6 on both machines to act as new mirrors, and effectively clone Foo's installation onto Bar? Thanks, --rp