From owner-freebsd-questions@FreeBSD.ORG Tue Jan 27 19:20:23 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F808106564A for ; Tue, 27 Jan 2009 19:20:23 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id 322318FC22 for ; Tue, 27 Jan 2009 19:20:23 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id n0RJJCsq092534; Tue, 27 Jan 2009 14:19:12 -0500 (EST) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id n0RJJCcO092533; Tue, 27 Jan 2009 14:19:12 -0500 (EST) (envelope-from jerrymc) Date: Tue, 27 Jan 2009 14:19:12 -0500 From: Jerry McAllister To: Vladislav Sekulic Message-ID: <20090127191912.GA92416@gizmo.acns.msu.edu> References: <20090126220411.b9c04ypy0wo04wkk@webmail.utoronto.ca> <20090127155314.GC91587@gizmo.acns.msu.edu> <20090127134936.02bl16g2s4g4o8gw@webmail.utoronto.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090127134936.02bl16g2s4g4o8gw@webmail.utoronto.ca> User-Agent: Mutt/1.4.2.2i Cc: Jerry McAllister , freebsd-questions@freebsd.org Subject: Re: Adding partitions to gmirror device 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: Tue, 27 Jan 2009 19:20:23 -0000 On Tue, Jan 27, 2009 at 01:49:36PM -0500, Vladislav Sekulic wrote: > Thanks, Wojciech and Jerry, for your help. > > Quoting Jerry McAllister : > > >First of all, you say that you have allocated 27GB of 238GB available. > >Is that 238GB in the existing slice - gm0s1 or is it outside of > >that slice? (NOTE, the 's' in the device name stands for slice - > >so it is slice 1 of a possible 4). > > > > It's 27GB used within the existing slice; gm0s1 spans the entire disk. > > >It could be helpful if you posted you /etc/fstab file and also > >what is printed if you do: bsdlabel gm0s1 or, if it is what > >they call 'dangerously dedicated' do: bsdlabel gm0 > > > > $ sudo bsdlabel /dev/mirror/gm0s1 > # /dev/mirror/gm0s1: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 1048576 0 4.2BSD 2048 16384 8 > b: 8320016 1048576 swap > c: 488375937 0 unused 0 0 # "raw" > part, don't edit > d: 2097152 9368592 4.2BSD 2048 16384 28528 > e: 10485760 11465744 4.2BSD 2048 16384 28528 > f: 41943040 21951504 4.2BSD 2048 16384 28528 OK. Based on this you can just do the bsdlabel -e /dev/mirror/gm0s1 as root (or from the fixit) and then, right after the definition of the 'f:' partition make an 'h:' partition with '*' as both size and offset. eg. h: * * 4.2BSD 2048 16384 28528 Write and exit from the edit session and then newfs the new partition and fix up your /etc/fstab - the real one, not the fixit one so it will mount where you want it - don't forget to make the mount point. It should work just fine. Note, that when you are running from the fixit, it makes a filesystem in memory and mounts that as root (/). Your real root from the disk will probably be in /dev/mirror/gm0s1a so you will need to make a mount point in the memory root, let's say /tmproot and mount to that and then edit that fstab. eg Boot from fixit - get that holographic shell going bsdlabel -e /dev/mirror/gm0s1 Do the editing, write and quit mkdir /tmproot mount -w /dev/mirror/gm0s1a /tmproot cd /tmproot/etc vi fstab fix it up, write and quit Pull the CD, reboot and things should be just fine. My only concern is, I have never used the fixit on a mirror. I presume it should look just the same, but who knows, it might have a different looking address. I hope the gmirror stuff works on the fixit. If not, you will need to make a boot on something else - another hard disk with a full system. ////jerry > > >If it is all in that gmos1 slice, then just use bsdlabel on that > >slice to add the rest to another partition within that slice. Just > >boot from something other than that mirror, make sure nothing > >in gm0 is mounted and then do: bsdlabel -e gm0s1 and fix it > >up as needed. > > > > Great, makes sense. I'll boot from the FreeBSD livecd and do this. > > Thanks again! > Vlad > > -- > Vladislav Sekulic > Research Computing System Administrator > Systems and Networks Research Group > Dept. of Computer Science, University of Toronto > http://www.cs.toronto.edu/~pocsys > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >