From owner-freebsd-questions@FreeBSD.ORG Tue Jan 27 04:20:39 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 BD46C1065670 for ; Tue, 27 Jan 2009 04:20:39 +0000 (UTC) (envelope-from vlad.sekulic@utoronto.ca) Received: from bureau63.ns.utoronto.ca (bureau63.ns.utoronto.ca [128.100.132.160]) by mx1.freebsd.org (Postfix) with ESMTP id 6F4608FC0C for ; Tue, 27 Jan 2009 04:20:39 +0000 (UTC) (envelope-from vlad.sekulic@utoronto.ca) Received: from localhost (webmail16.ns.utoronto.ca [128.100.132.157]) by bureau63.ns.utoronto.ca (8.13.8/8.13.8) with ESMTP id n0R34BuU022687 for ; Mon, 26 Jan 2009 22:04:11 -0500 Received: from 76-10-159-36.dsl.teksavvy.com (76-10-159-36.dsl.teksavvy.com [76.10.159.36]) by webmail.utoronto.ca (Horde MIME library) with HTTP; Mon, 26 Jan 2009 22:04:11 -0500 Message-ID: <20090126220411.b9c04ypy0wo04wkk@webmail.utoronto.ca> Date: Mon, 26 Jan 2009 22:04:11 -0500 X-ID: sekulicv From: Vladislav Sekulic To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.6) X-PMX-Version: 5.4.2.338381, Antispam-Engine: 2.6.0.325393, Antispam-Data: 2009.1.27.25524 Subject: 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 04:20:40 -0000 Hi! I'm running FreeBSD 7.1-RELEASE on a couple of Sun X2100 servers, each =20 with 2X 250GB SATA drives that I've established a gmirror(8) over, =20 following the instructions in section 19.4 of the Handbook. Now, one of the machines, being transformed into a webserver, needs a =20 separate, newly created /var/www partition (its current partitions =20 only take up 27G of the total ~238G available). My dilemma is -- how do I add another partition without hosing the =20 system? It seems to me that there is no other way than to destroy the =20 gmirror, create the new partition, then re-create the gmirror. The =20 issue is how to proceed in a safe manner, without destroying any data =20 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 =20 gmirror to be wiped, and hence the gmirror to be destroyed, based on =20 my potentially faulty reading of the manpage. Then edit fstab to restore the ``/dev/mirror/gm0s1?'' entries to their =20 corresponding ``/dev/ad4s1?'' entries & reboot. Afterwards, would run ``bsdlabel -e ad4'', then newfs, and finally, =20 redo the gmirror sequence (following the steps in section 19.4 of the =20 handbook, as before). Am I missing any critical steps here, or have any redundant steps? Or =20 just not getting it? Thank you for any pointers! Vlad P.S. Is it possible to operate directly on the gm0 device, i.e., to =20 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