From owner-freebsd-geom@FreeBSD.ORG Mon Apr 25 04:33:09 2005 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B6BB16A4CE for ; Mon, 25 Apr 2005 04:33:09 +0000 (GMT) Received: from gromit.dlib.vt.edu (gromit.dlib.vt.edu [128.173.49.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9223443D41 for ; Mon, 25 Apr 2005 04:33:08 +0000 (GMT) (envelope-from paul@gromit.dlib.vt.edu) Received: from zappa.Chelsea-Ct.Org (pool-70-110-10-69.roa.east.verizon.net [70.110.10.69]) by gromit.dlib.vt.edu (8.13.3/8.13.3) with ESMTP id j3P4X6GA021290 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 Apr 2005 00:33:07 -0400 (EDT) (envelope-from paul@gromit.dlib.vt.edu) Received: from zappa.Chelsea-Ct.Org (localhost.Chelsea-Ct.Org [127.0.0.1]) by zappa.Chelsea-Ct.Org (8.13.3/8.13.3) with ESMTP id j3P4X0b6079390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 Apr 2005 00:33:01 -0400 (EDT) (envelope-from paul@gromit.dlib.vt.edu) Received: (from paul@localhost) by zappa.Chelsea-Ct.Org (8.13.3/8.13.3/Submit) id j3P4Wxr2079389; Mon, 25 Apr 2005 00:33:00 -0400 (EDT) (envelope-from paul@gromit.dlib.vt.edu) X-Authentication-Warning: zappa.Chelsea-Ct.Org: paul set sender to paul@gromit.dlib.vt.edu using -f From: Paul Mather To: Jeremy Claeson In-Reply-To: <16a400ac050424194712d4eca0@mail.gmail.com> References: <4250A400.50200@videotron.ca> <4250F778.3040903@zvala.cz> <4251F631.3050707@videotron.ca> <20050404213800.A29631@denninger.net> <16a400ac05041317272eb1ea01@mail.gmail.com> <16a400ac050424194712d4eca0@mail.gmail.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Mon, 25 Apr 2005 00:32:59 -0400 Message-Id: <1114403579.78883.80.camel@zappa.Chelsea-Ct.Org> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 FreeBSD GNOME Team Port cc: freebsd-geom@freebsd.org Subject: Re: mirroring two data disks (no system files on them) X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2005 04:33:09 -0000 On Sun, 2005-04-24 at 22:47 -0400, Jeremy Claeson wrote: > I'm still confused. I've seen some great emails on some things that > seem pretty complicated to me, but I've yet to hear from anyone who > can walk me through what I'm doing wrong. Maybe I'm doing something > too complicated, can someone let me know that at least? Thanks! Please > help and thanks in advance! > > On 4/13/05, Jeremy Claeson wrote: > > I'm trying to do the same thing but I've not had any luck still. I'm > > messing up somewhere in preparing the drives. I've got two 250GB > > drives (ad4 and ad6). I'd like to mirror them as data disks. > > > > Here's what I'm doing: > > $ /stand/sysinstall > > (fdisk and label ad4 as /usr/sambashares/data and writing that out to > > disk. this works and I can access the disk) > > $ /stand/sysinstall > > (fdisk ad6 and write that out to disk) > > $ gmirror label -v -n -b round-robin gm0s1 /dev/ad3s1 > > $ gmirror load > > (Here everything looks ok but I get a warning: > > "WARNING: Expected rawoffset 0, found 63" > > "GEOM_MIRROR: Cannot add disk mirror/gm0s1c to gm0s1 (error=17).") > > $ gmirror configure -a gm0s1 > > (at this point I get an error that says "Bad address" and then nothing > > else works.) > > > > [root@epiphyte jclaeson]# ls /dev/ad4* /dev/ad6* > > /dev/ad4 /dev/ad4s1 /dev/ad4s1c /dev/ad4s1d /dev/ad6 > > > > [root@epiphyte jclaeson]# ll /dev/mirror/ > > total 1 > > dr-xr-xr-x 2 root wheel 512 Apr 13 20:19 ./ > > dr-xr-xr-x 5 root wheel 512 Apr 13 16:13 ../ > > crw-r----- 1 root operator 4, 30 Apr 13 20:13 gm0 > > crw-r----- 1 root operator 4, 31 Apr 13 20:13 gm0s1 > > crw-r----- 1 root operator 4, 31 Apr 13 20:13 gm0s1 > > crw-r----- 1 root operator 4, 33 Apr 13 20:13 gm0s1c > > crw-r----- 1 root operator 4, 33 Apr 13 20:13 gm0s1c > > > > [root@epiphyte jclaeson]# bsdlabel ad4s1 > > # /dev/ad4s1: > > 8 partitions: > > # size offset fstype [fsize bsize bps/cpg] > > c: 488392002 0 unused 0 0 # "raw" part, > > don't edit > > d: 488392002 0 4.2BSD 2048 16384 28552 > > > > [root@epiphyte jclaeson]# bsdlabel ad6s1 > > bsdlabel: /dev/ad6s1: No such file or directory > > [root@epiphyte jclaeson]# bsdlabel ad6 > > bsdlabel: /dev/ad6: no valid label found > > [root@epiphyte jclaeson]# > > > > So, I'm sure I'm preppring the disks wrong, I'm just not sure what I'm > > doing wrong. In the above, you shouldn't be trying to bsdlabel the underlying providers after having created your mirror using them. Have you tried following the example in the gmirror man page? If you want to create a single filesystem covering the entire mirror composed of entire disks from which you don't need to boot, you can dispense with a partition table (slice) and even disklabel. I.e., you can skip fdisk and bsdlabel (or using sysinstall). In other words, to create a "data" mirror on ad4 and ad6, try something like: gmirror label -v -b round-robin data ad4 ad6 newfs -U /dev/mirror/data mount /dev/mirror/data /usr/sambashares/data (or wherever) You can add /dev/mirror/data to /etc/fstab, and add 'geom_mirror_load="YES"' to /boot/loader.conf to have the mirror mounted automatically at boot. (Or you can add "options GEOM_MIRROR" to your kernel config file instead of loading it as a kernel module via /boot/loader.conf.) If you have been experimenting with ad4 and ad6, you might want to dd /dev/zero over the beginning of the drive to get rid of any existing partition table or disklabel. You can also use "gmirror clear ad4 ad6" to clear any existing mirror metadata on there. If you want to have multiple file systems on the mirror, you might want to bsdlabel /dev/mirror/data between the "gmirror label" and newfs commands. Cheers, Paul. -- e-mail: paul@gromit.dlib.vt.edu "Without music to decorate it, time is just a bunch of boring production deadlines or dates by which bills must be paid." --- Frank Vincent Zappa