From owner-freebsd-geom@FreeBSD.ORG Wed Jan 6 17:57:17 2010 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA92D1065672 for ; Wed, 6 Jan 2010 17:57:17 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id E59938FC1A for ; Wed, 6 Jan 2010 17:57:16 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 7731145EE5; Wed, 6 Jan 2010 18:57:14 +0100 (CET) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 04C0145EE6; Wed, 6 Jan 2010 18:57:08 +0100 (CET) Date: Wed, 6 Jan 2010 18:57:18 +0100 From: Pawel Jakub Dawidek To: Fernan Aguero Message-ID: <20100106175718.GB1719@garage.freebsd.pl> References: <20100105182920.GC12091@iib.unsam.edu.ar> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yEPQxsgoJgBvi8ip" Content-Disposition: inline In-Reply-To: <20100105182920.GC12091@iib.unsam.edu.ar> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-geom@freebsd.org Subject: Re: gstripe: delete one, and enlarge another partition? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 17:57:18 -0000 --yEPQxsgoJgBvi8ip Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 05, 2010 at 03:29:20PM -0300, Fernan Aguero wrote: > Hi, >=20 > I've been using GEOM in a box successfully for years (both > mirrored (for the OS), and striped partitions (for a CPAN > mirror, a FreeBSD CVS mirror, tinderbox and other uses). >=20 > Now, I would like to do some reorganization with the striped > partitions (delete one of the striped partitions, and grow > one of the remaining striped partitions).=20 >=20 > /dev/stripe/gs0d 9.7G 604M 8.3G 7% /usr/obj > /dev/stripe/gs0e 29G 9.0G 18G 34% /freebsd > /dev/stripe/gs0f 29G 1.1G 26G 4% /mirror > /dev/stripe/gs0g 85G 5.9G 73G 8% /scratch >=20 > gama# gstripe list > Geom name: gs0 > State: UP > Status: Total=3D2, Online=3D2 > Type: AUTOMATIC > Stripesize: 4096 > ID: 1659247043 > Providers: > 1. Name: stripe/gs0 > Mediasize: 169757777920 (158G) > Sectorsize: 512 > Mode: r4w4e5 > Consumers: > 1. Name: ad4s3 > Mediasize: 84878889984 (79G) > Sectorsize: 512 > Mode: r4w4e6 > Number: 0 > 2. Name: ad6s3 > Mediasize: 84878889984 (79G) > Sectorsize: 512 > Mode: r4w4e6 > Number: 1 >=20 > I would like to delete gs0f and make gs0g use the reclaimed > space .... or better still fuse the two (preserving > contents, is that possible at all?) >=20 > Of course I can do a backup, delete everything and recreate > the partitions, but, being lazy, I was wondering if there is > a painless and easy way to do this. >=20 > I've been reading some posts, some man pages, and was > tempted to try and delete gs0g and then use growfs.=20 >=20 > Would this work? I'd appreciate any tip or suggestion (or even a shout!) >=20 > i) gstripe stop gs0 > ii) bsdlabel -e ad4s3 (ad6s3) and then delete ad4s3g (ad6s3g)? > iii) growfs -sXXXXXXXX /dev/ad4s3f (ad6s3f)? Why do you want to stop stripe and repartition slices? =46rom what I see you have slices on disks, then stripe on slices and then partitions on stripe. There is no need to change the order, simply 'bsdlabel -e /dev/stripe/gs0'. > where do I get the new size (XXXXXX) for growfs?=20 > Would 184757504 be OK? (from bsdlabel output, below): >=20 > # /dev/ad4s3: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > c: 331558160 0 unused 0 0 # "raw" part, do= n't edit > d: 20971520 16 4.2BSD 2048 16384 28552=20 > e: 62914560 20971536 4.2BSD 2048 16384 28552=20 > f: 62914560 83886096 4.2BSD 2048 16384 28552=20 > g: 184757504 146800656 4.2BSD 2048 16384 28552=20 > partition c: partition extends past end of unit > bsdlabel: partition c doesn't cover the whole unit! > bsdlabel: An incorrect partition c may cause problems for standard system= utilities > partition g: partition extends past end of unit >=20 >=20 > This is on FreeBSD-6.4p8, i386 (RELENG_6_4) --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --yEPQxsgoJgBvi8ip Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFLRM7+ForvXbEpPzQRAhmmAKDNftVhyXI86E9Pvn0FwjzwxipzsQCgrrTO +K2hOGZy0N/W/TQ4A5txRG0= =t7Ro -----END PGP SIGNATURE----- --yEPQxsgoJgBvi8ip--