From owner-freebsd-questions@FreeBSD.ORG Thu Apr 19 20:15:22 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D2A716A402 for ; Thu, 19 Apr 2007 20:15:22 +0000 (UTC) (envelope-from nagylzs@freemail.hu) Received: from smtp.enternet.hu (smtp.enternet.hu [62.112.192.21]) by mx1.freebsd.org (Postfix) with ESMTP id EE52A13C45E for ; Thu, 19 Apr 2007 20:15:21 +0000 (UTC) (envelope-from nagylzs@freemail.hu) Received: from [80.99.163.122] (helo=[172.16.0.43]) by smtp.enternet.hu with esmtpa (Exim 4) id 1Hed2G-000Fb7-IV; Thu, 19 Apr 2007 22:15:20 +0200 Message-ID: <4627CDDA.909@freemail.hu> Date: Thu, 19 Apr 2007 22:15:22 +0200 From: =?ISO-8859-1?Q?Nagy_L=E1szl=F3_Zsolt?= User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: L Goodwin , freebsd-questions@freebsd.org References: <14876.14778.qm@web58105.mail.re3.yahoo.com> In-Reply-To: <14876.14778.qm@web58105.mail.re3.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Samba and RAID 1 using gmirror on 2 new disks X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Apr 2007 20:15:22 -0000 *L Goodwin wrote: > > Both assume you only have 2 drives and want to mirror the drive containing FreeBSD. I only want to mirror the data drive da1, and would appreciate a concise set of steps for doing this right the first time. 1. First of all, you should install the base system on da0 and boot it. (Leave da1 and da2 untouched) 2. Create a slice on da1 ("fdisk"). The name of the new slice will probably be "da1s1". (You will find this inside sysinstall) I found that sometimes I had to use a bit smaller slice than the available space, because equally looking disks are not always equal. (Not kidding!) 3. Use disklabel editor to add partitions to the slice (/dev/da1s1a,/dev/da1s1b,/dev/da1s1c etc.) and format them with newfs as needed. 4. Change loader.conf, add this line: geom_mirror_load="YES" 5. Execute these: gmirror load gmirror label -v -b round-robin gm0 /dev/da1 6. Carefully rename all references in /etc/fstab /dev/da1s1X becomes /dev/mirror/gm0s1X (where X can be a,b,c,d etc.) 7. Reboot 8. Check your mirror with "gmirror list" and "gmirror status", and see if your filesystems are mounted with "df". 9. Add da2 to your mirror with this command: gmirror insert gm0 /dev/da2 Please ask others, as I did not try this and I'm not 100% sure it will work. But I think it should. Best, Laszlo *