From owner-freebsd-questions@FreeBSD.ORG Fri Apr 20 19:39:29 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 D3B1916A402 for ; Fri, 20 Apr 2007 19:39:29 +0000 (UTC) (envelope-from xrayv19@yahoo.com) Received: from web58105.mail.re3.yahoo.com (web58105.mail.re3.yahoo.com [68.142.236.128]) by mx1.freebsd.org (Postfix) with SMTP id 9591A13C489 for ; Fri, 20 Apr 2007 19:39:29 +0000 (UTC) (envelope-from xrayv19@yahoo.com) Received: (qmail 60107 invoked by uid 60001); 20 Apr 2007 19:39:29 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=OynvUKJlWGCaIeKfSqVvq3eThV80SlR0SJBOMfOcnL1KwFHBdADCHVxs1a4d1xglnpGNwHnJOwGBDJkxpTshTk0yz3dDHSVce9CrQySNozLeM5fvlVPeJpkK5EbHQhjmV3yTxm3iG2TO0ClM7uL3LHhNq5jkVmlflp2de1VJHvo=; X-YMail-OSG: DUhZFMAVM1lIW30wxUnnR7acl2_a5mu7k8VhGtzH_jEM5N15LkYQgp0GCTn6mNDv7EO1YFzoektLUqa0fmGUVU17GdrZ.3tWsmo7RGFl5oUTssjuIsNJtQ-- Received: from [131.191.24.2] by web58105.mail.re3.yahoo.com via HTTP; Fri, 20 Apr 2007 12:39:28 PDT Date: Fri, 20 Apr 2007 12:39:28 -0700 (PDT) From: L Goodwin To: Nagy "László" Zsolt , freebsd-questions@freebsd.org In-Reply-To: <4627CDDA.909@freemail.hu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-918971632-1177097968=:54818" Content-Transfer-Encoding: 8bit Message-ID: <959264.54818.qm@web58105.mail.re3.yahoo.com> X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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: Fri, 20 Apr 2007 19:39:29 -0000 --0-918971632-1177097968=:54818 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thanks for the steps, Laszlo. I got as far as creating a freebsd slice on da1 (both da1 and da2 have been low-level formatted). Now I have two questions: 1) When creating the slice on da1, I specified to use the entire disk, but there are 2 unused sections -- one before and one after the new slice (please see attached file). Should I start over and specify a smaller size? What size should I specify?:' 2) About creating partitions on da1: You specified to add partitions to the slice (/dev/da1s1a, /dev/da1s1b,/dev/da1s1c etc.). Please note: a) The entire FreeBSD filesystem is on da0. b) I want to use the entire da1 disk for users on Windows clients to store files/documents on. I also want the mirror disk (da2) to be backed up regularly. Do I need to create more than one partition on da1? What are the requirements for naming partitions in this situation? Thanks! Nagy László Zsolt wrote: *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 * --------------------------------- Ahhh...imagining that irresistible "new car" smell? Check outnew cars at Yahoo! Autos. --0-918971632-1177097968=:54818 Content-Type: text/plain; name="FDISK.txt" Content-Description: 2793854837-FDISK.txt Content-Disposition: inline; filename="FDISK.txt" Prepare disks da1 and da2 (after low-level format): Run FDISK from systinstall: DISK name: da1 FDISK Partition Editor Disk Geometry: 1115 cyls/255 heads/63 sectors = 17912475 sectors Offset Size(ST) End Name PType Desc Subtype Flags 0 17916240 17916239 - 12 unused 0 After Create slice (size = 17916240, type = 165): Offset Size(ST) End Name PType Desc Subtype Flags 0 63 62 - 12 unused 0 63 17912412 1912474 da1s1 8 freebsd 165 17912475 3765 17916239 - 12 unused 0 --0-918971632-1177097968=:54818--