From owner-freebsd-questions Tue Mar 12 7:47:27 2002 Delivered-To: freebsd-questions@freebsd.org Received: from tcpns.com (dsl-64-192-239-221.telocity.com [64.192.239.221]) by hub.freebsd.org (Postfix) with ESMTP id 5725A37B887; Tue, 12 Mar 2002 07:46:09 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by tcpns.com (8.12.2/8.12.2) with ESMTP id g2CFKl78008572; Tue, 12 Mar 2002 10:20:47 -0500 (EST) Date: Tue, 12 Mar 2002 10:20:47 -0500 (EST) From: Jason Borkowsky To: Greg Lehey Cc: questions@FreeBSD.org Subject: Re: Using VINUM to do RAID-1 disk mirroring In-Reply-To: <20020312094817.S36158@wantadilla.lemis.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I really am trying very hard to understand all of this, and have spent hours both reading about vinum and playing with it on my test box. In the process I have learned a lot about master boot records, disk layout, etc, so it is all good. So I just want to go over this to make sure I have it right. I currently have two identical drives and want to have one mirror the other. I have set up identical file systems (including swap, but swap won't be mirrored). The drives look as follows: /dev/ad0: # size offset fstype [fsize bsize bps/cpg] a: 204800 0 4.2BSD 2048 16384 97 # (Cyl. 0 - 12*) b: 4194304 3325952 swap # (Cyl. 207*- 468*) c: 80405262 0 unused 0 0 # (Cyl. 0 - 5004*) e: 1024000 204800 4.2BSD 2048 16384 90 # (Cyl. 12*- 76*) f: 2097152 1228800 4.2BSD 2048 16384 89 # (Cyl. 76*- 207*) g: 20971520 7520256 4.2BSD 2048 16384 89 # (Cyl. 468*- 1773*) h: 51913486 28491776 4.2BSD 2048 16384 89 # (Cyl. 1773*- 5004*) /dev/ad2: # size offset fstype [fsize bsize bps/cpg] a: 204800 0 4.2BSD 2048 16384 97 # (Cyl. 0 - 12*) b: 4194304 3325952 swap # (Cyl. 207*- 468*) c: 80405262 0 unused 0 0 # (Cyl. 0 - 5004*) e: 1024000 204800 4.2BSD 2048 16384 90 # (Cyl. 12*- 76*) f: 2097152 1228800 4.2BSD 2048 16384 89 # (Cyl. 76*- 207*) g: 20971520 7520256 4.2BSD 2048 16384 89 # (Cyl. 468*- 1773*) h: 51913486 28491776 4.2BSD 2048 16384 89 # (Cyl. 1773*- 5004*) Now, I need to change the file system type to vinum of all the partitions I want to mirror: /dev/ad0: # size offset fstype [fsize bsize bps/cpg] a: 204800 0 vinum 2048 16384 97 # (Cyl. 0 - 12*) b: 4194304 3325952 swap # (Cyl. 207*- 468*) c: 80405262 0 unused 0 0 # (Cyl. 0 - 5004*) e: 1024000 204800 vinum 2048 16384 90 # (Cyl. 12*- 76*) f: 2097152 1228800 vinum 2048 16384 89 # (Cyl. 76*- 207*) g: 20971520 7520256 vinum 2048 16384 89 # (Cyl. 468*- 1773*) h: 51913486 28491776 vinum 2048 16384 89 # (Cyl. 1773*- 5004*) /dev/ad2: # size offset fstype [fsize bsize bps/cpg] a: 204800 0 vinum 2048 16384 97 # (Cyl. 0 - 12*) b: 4194304 3325952 swap # (Cyl. 207*- 468*) c: 80405262 0 unused 0 0 # (Cyl. 0 - 5004*) e: 1024000 204800 vinum 2048 16384 90 # (Cyl. 12*- 76*) f: 2097152 1228800 vinum 2048 16384 89 # (Cyl. 76*- 207*) g: 20971520 7520256 vinum 2048 16384 89 # (Cyl. 468*- 1773*) h: 51913486 28491776 vinum 2048 16384 89 # (Cyl. 1773*- 5004*) I now do my vinum configuration (which actually is the easy part, since there are a lot of examples on that plus I can play around with it on my test machine). The config will look something like this: drive ad0s1a device /dev/ad0s1a drive ad2s1a device /dev/ad2s1a drive ad0s1e device /dev/ad0s1e drive ad2s1e device /dev/ad2s1e drive ad0s1f device /dev/ad0s1f drive ad2s1f device /dev/ad2s1f drive ad0s1g device /dev/ad0s1g drive ad2s1g device /dev/ad2s1g drive ad0s1h device /dev/ad0s1h drive ad2s1h device /dev/ad2s1h volume mirror setupstate plex org concat sd length 0 drive ad0s1a plex org concat sd length 0 drive ad2s1a volume mirror setupstate plex org concat sd length 0 drive ad0s1e plex org concat sd length 0 drive ad2s1e volume mirror setupstate plex org concat sd length 0 drive ad0s1f plex org concat sd length 0 drive ad2s1f volume mirror setupstate plex org concat sd length 0 drive ad0s1g plex org concat sd length 0 drive ad2s1g volume mirror setupstate plex org concat sd length 0 drive ad0s1h plex org concat sd length 0 drive ad2s1h Then I start up vinum, read in my config, and use something called a "revive" command which will then sync up all of the partitions, and then vinum will keep everything in sync. Meanwhile, I also create a boot floppy (or, even, a separate boot harddrive) which I use in case of an emergency, which would allow me to boot in case of an emergency (failed hard drive, corrupt file system, etc). So now does this sequence of events sound about right? Is there anything I missed? Hopefully I am getting there as I finally think I'm grasping all of this. Thanks again! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message