From owner-freebsd-questions Tue Mar 23 15:28:37 1999 Delivered-To: freebsd-questions@freebsd.org Received: from inet.chip-web.com (c1003518-a.plstn1.sfba.home.com [24.1.82.47]) by hub.freebsd.org (Postfix) with SMTP id D58A614C23 for ; Tue, 23 Mar 1999 15:28:35 -0800 (PST) (envelope-from ludwigp@bigfoot.com) Received: (qmail 29613 invoked from network); 23 Mar 1999 23:28:14 -0000 Received: from speedy.chip-web.com (HELO speedy) (172.16.1.1) by inet.chip-web.com with SMTP; 23 Mar 1999 23:28:14 -0000 Message-Id: <4.1.19990323151418.00b36ee0@mail-r> X-Sender: ludwigp2@mail-r X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1 Date: Tue, 23 Mar 1999 15:28:09 -0800 To: Codeguy , freebsd-questions@freebsd.org From: Ludwig Pummer Subject: Re: Beginner questions re. vinum In-Reply-To: <199903232227.OAA19794@wolf.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 02:27 PM 3/23/99 , Codeguy wrote: >I've currently got 1.2 GB of each drive allocated; >swap apace and root FS on da0, and /work on da1. >I'd like to use the remaining 3.3 GB of each drive >for vinum volumes. Any reasons why I shouldn't be >able to do so? By unallocated, you mean not allocated in a slice, or not allocated in a partition? (Did you leave it empty when you were using sysinstall's fdisk or sysinstall's partition editor ?) >I *have* read through the man pages (I've got hard copy >here in front of me), and think I have an idea of how to >proceed. I've created a file named /etc/vinum.rc, containing: > >drive drive0 device /dev/da0 >drive drive1 device /dev/da1 This tells vinum to use all of both SCSI disks. Including the 1.2GB of already-allocated space. If the unallocated space wasn't assigned a slice, run fdisk to add a slice for it, create a partition which takes the entire disk using disklabel, and change the devices to be /dev/da0s2e or something similar. If the unallocated space is in the FreeBSD slice but not in a partition, use disklabel to assign it a partition and change the devices to be /dev/da0s1g or something similar. >volume www > plex org striped 256k > sd length 1600m drive drive0 > sd length 1600m drive drive1 >volume logs > plex org striped 256k > sd length 1600m drive drive0 > sd length 1600m drive drive1 This does not mirror data. What this does is say that for each volume, you will have one plex (one copy of the data) split across the two drives. If you re-read the vinum manpages, you will see a sentence saying something like "a plex contains the entire address space of the volume...". If you want to have 2 copies of your www data, you need to make 2 plexes for each volume, not 2 subdisks for each plex. So the config becomes: volume www plex org concat sd length 1600m drive drive0 plex org concat sd length 1600m drive drive1 volume logs plex org concat sd length 1600m drive drive0 plex org concat sd length 1600m drive drive1 >As I understand what I've read, this should identify both >hard drives as eligible for vinum control, identify volumes named >"www" and "logs", each of which is built out of 256 kbyte stripes >across both drives, for a total size of 1600 megs each volume. >Is this more or less correct? You told it to (for each volume) to create a 3.2GB volume, which is shared across 2 drives. So if one drive goes down, your data is gone. >My next step was: > vinum create /etc/vinum.rc >which seemd to complete normally. This was followed by > vinum init www > vinum init logs >which also seemed to complete normally (and very quickly as >well - just a few seconds). I then tried > vinum start www > vinum start logs >which produced after just a few seconds: > vinum: Can't write config top /dev/da0, error 19 > vinum: drive0 is down > vinum: www.p0.s0 is crashed > vinum: www.p0 is corrupt > vinum: logs.p0.s0 is crashed > vinum: logs.p0 is corrupt > vinum: drive1 is down > vinum: www.p0.s1 is crashed > vinum: www.p0 is faulty > vinum: www is down > vinum: logs.p0.s1 is crashed > vinum: logs.p0 is faulty > vinum: logs is down > >I assume this indicates that I did something majorly dumb. >Could some kind soul please point out the error of my ways? Yes. It's complaining that it can't write to the entirety of you da0 and da1 disks (probably because FreeBSD won't let it because you have mounted filesystems there). I don't know too much about exactly when FreeBSD would stop vinum from writing to da0... some parts of the disk may have already been overwritten and you just haven't noticed yet (i'm thinking the boot sector/boot loaders). Greg, please correct me here. >And finally, once I have managed to complete the proper steps >to actually have a working vinum config, what do I need to do >to newfs my vinum volumes? The only special thing you need is the -v flag, which is mentioned in the vinum manpages. newfs -v /dev/vinum/www newfs -v /dev/vinum/logs Then create mountpoints for the 2 volumes, add them to your /etc/fstab, and try mounting. --Ludwig Pummer ( ludwigp@bigfoot.com ) ICQ UIN: 692441 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message