From owner-freebsd-questions@FreeBSD.ORG Tue Jan 27 15:54:27 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 182B2106566C for ; Tue, 27 Jan 2009 15:54:27 +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 DE34B8FC13 for ; Tue, 27 Jan 2009 15:54:25 +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 n0RFrEtO091740; Tue, 27 Jan 2009 10:53:14 -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 n0RFrEJt091739; Tue, 27 Jan 2009 10:53:14 -0500 (EST) (envelope-from jerrymc) Date: Tue, 27 Jan 2009 10:53:14 -0500 From: Jerry McAllister To: Vladislav Sekulic Message-ID: <20090127155314.GC91587@gizmo.acns.msu.edu> References: <20090126220411.b9c04ypy0wo04wkk@webmail.utoronto.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090126220411.b9c04ypy0wo04wkk@webmail.utoronto.ca> User-Agent: Mutt/1.4.2.2i Cc: 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 15:54:27 -0000 On Mon, Jan 26, 2009 at 10:04:11PM -0500, Vladislav Sekulic wrote: > Hi! > > I'm running FreeBSD 7.1-RELEASE on a couple of Sun X2100 servers, each > with 2X 250GB SATA drives that I've established a gmirror(8) over, > following the instructions in section 19.4 of the Handbook. > > Now, one of the machines, being transformed into a webserver, needs a > separate, newly created /var/www partition (its current partitions > only take up 27G of the total ~238G available). > > My dilemma is -- how do I add another partition without hosing the > system? It seems to me that there is no other way than to destroy the > gmirror, create the new partition, then re-create the gmirror. The > issue is how to proceed in a safe manner, without destroying any data > or causing undue hassle (time is of the essence, as always). > > My draft plan is as follows, with ad4 and ad6 being the component drives: > > $ sudo gmirror deactivate gm0 /dev/ad6 > $ sudo gmirror deactivate gm0 /dev/ad4 > $ sudo gmirror remove gm0 /dev/ad6 > $ sudo gmirror remove gm0 /dev/ad4 > > I believe this would result in all metadata associated with the > gmirror to be wiped, and hence the gmirror to be destroyed, based on > my potentially faulty reading of the manpage. > > Then edit fstab to restore the ``/dev/mirror/gm0s1?'' entries to their > corresponding ``/dev/ad4s1?'' entries & reboot. > > Afterwards, would run ``bsdlabel -e ad4'', then newfs, and finally, > redo the gmirror sequence (following the steps in section 19.4 of the > handbook, as before). > > Am I missing any critical steps here, or have any redundant steps? Or > just not getting it? I may be confused here, but I think you are making too many steps rather than missing some. But, partly my problem is that I do not have the whole picture of what you have currently set up. 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 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 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. If you are getting the terminology mixed and it is not in that slice, it depends on how you want your disk built. If there is no slice and it is what some call 'dangerously dedicated', then run bsdlabel on gm0 rather than gm0s1 (eg bsdlabel -e gm0). >From your comments above, it sounds like you have made a slice on it. But, seeing fstab and the output of bsdlabel would help figure it out. ////jerry > > Thank you for any pointers! > > Vlad > > P.S. Is it possible to operate directly on the gm0 device, i.e., to > create a partition using it rather than destroying the entire gmirror? > > -- > 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" >