From owner-freebsd-questions Thu May 17 14:50:11 2001 Delivered-To: freebsd-questions@freebsd.org Received: from lcmail2.lc.ca.gov (lcmail2.lc.ca.gov [165.107.12.11]) by hub.freebsd.org (Postfix) with ESMTP id 24E2D37B43E for ; Thu, 17 May 2001 14:50:07 -0700 (PDT) (envelope-from drewt@writeme.com) Received: from CONVERSION-DAEMON by lcmail2.lc.ca.gov (PMDF V5.2-27 #40821) id <0GDI004011V2YK@lcmail2.lc.ca.gov> for freebsd-questions@FreeBSD.org; Thu, 17 May 2001 14:48:26 -0700 (PDT) Received: from tagalong ([165.107.42.167]) by lcmail2.lc.ca.gov (PMDF V5.2-27 #40821) with SMTP id <0GDI0047V1RLCG@lcmail2.lc.ca.gov> for freebsd-questions@FreeBSD.org; Thu, 17 May 2001 14:45:22 -0700 (PDT) Date: Thu, 17 May 2001 14:45:02 -0700 From: Drew Tomlinson Subject: RE: www.vinumvm.org In-reply-to: <20010516114223.C35292@wantadilla.lemis.com> To: 'Greg Lehey' Cc: "FreeBSD Questions (E-mail)" Message-id: MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: X-Loop: FreeBSD.ORG > -----Original Message----- > From: Greg Lehey [mailto:grog@lemis.com] > Sent: Tuesday, May 15, 2001 7:12 PM > To: Drew Tomlinson > Cc: FreeBSD Questions (E-mail) > Subject: Re: www.vinumvm.org [snip] > >>> I am trying to setup vinum on my 4.3 system for the first time and > >>> need some help as I'm not understanding this very well. > >>> Specifically, I have 3 4.3G drives with a 100M root > partition on the > >>> first and a 192M swap partition on the other two. The > remainder of > >>> the first drive has a second partition mounted as /usr. What I > >>> would really like to have to keep the 100M root partition (only > >>> because ASFAIK one can't use vinum on root) and have a > striped 384M > >>> swap and the remainder all of the space on all of the > drives as one > >>> large striped partition mounted as /usr. Is this possible? > >> > >> Only if all the Vinum drives (partitions) are thee same size. > > > > How would I do that? Take a backup of /usr, then delete it, create > > my Vinum drive, and then restore it? Or is there a better way? > > What "gotchas" might I come across? > > Well, in fact, all you need is to have same-sized subdisks. But if > you only want one volume, you'd have space left over if the drives > weren't all the same size. > > The trick way to turn /usr into a Vinum volume is to make swap 265 > sectors longer when installing, then place /usr immediately after > swap. After installation, reboot in single user mode, shorten swap by > 265 sectors and make an overlapping Vinum drive start there. The real > /usr will then be at the beginning of the subdisk space, so you just > need to define a plex with the same location as the /usr partition. > I'll write this up in more detail some day. I don't know much about drive geometry but I decided to give this a try. I want a 100M root partition, 384M of total swap space, and the rest in a large stripe set for /usr. I have 3 identical 4.3G drives in this system and labeled them as follows: da0s1: # size offset fstype [fsize bsize bps/cpg] a: 204800 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 12*) b: 127232 204800 swap # (Cyl. 12*- 20*) c: 8380080 0 unused 0 0 # (Cyl. 0 - 521*) e: 8048048 332032 4.2BSD 1024 8192 16 # (Cyl. 20*- 521*) da1s1 & da2s1: # size offset fstype [fsize bsize bps/cpg] b: 331776 0 swap # (Cyl. 0 - 20*) c: 8380080 0 unused 0 0 # (Cyl. 0 - 521*) e: 8048304 331776 4.2BSD # (Cyl. 20*- 521*) Next I installed the 4.3-RELEASE with da0s1e as /usr. The install was successful. Now I have rebooted into single user mode. Without mounting /usr, I am unable to use disklabel as vi is not found. I tried copying vi to /, setting EDITOR to reflect the change, and then running disklabel. But vi complained about not finding some "ELF" library on /usr/share. So I mounted /usr and was able to shorten swap on da0 but because da0s1e is mounted as /usr, I can't lengthen it and change the fstype to "vinum" It now looks like this: # size offset fstype [fsize bsize bps/cpg] a: 204800 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 12*) b: 126976 204800 swap # (Cyl. 12*- 20*) c: 8380080 0 unused 0 0 # (Cyl. 0 - 521*) e: 8048048 332032 4.2BSD 1024 8192 16 # (Cyl. 20*- 521*) I did change the disklabel on both da1 and da2. They are the same and look like this: # size offset fstype [fsize bsize bps/cpg] b: 331776 0 swap # (Cyl. 0 - 20*) c: 8380080 0 unused 0 0 # (Cyl. 0 - 521*) e: 8048304 331776 vinum # (Cyl. 20*- 521*) And when I get the partition tables right, I plan to use this configuration file to create my vinum volume for /usr: drive disk1 device /dev/da0e drive disk2 device /dev/da1e drive disk3 device /dev/da2e volume user plex org striped 300k sd length 3929m drive disk1 sd length 3929m drive disk2 sd length 3929m drive disk3 So where do I go from here? Am I close? I suspect that I need to change the label on da0s1e to fstype vinum, add 256 to the size, and subtract 256 from the offset. Then I can create my vinum volume. Is this correct? If so, how can I edit the partition that /usr lives on. I can't when /usr is mounted and I can't run the disklabel utility when /usr isn't mounted. If this is more that you bargained for when answering my cry for help and you don't have time for this, I certainly understand. Just tell me to go away and I will quit bothering you. I appreciate your time and help that you've already given me. Thanks, Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message