From owner-freebsd-geom@FreeBSD.ORG Wed Jan 6 19:21:46 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 2F128106566B; Wed, 6 Jan 2010 19:21:46 +0000 (UTC) (envelope-from fernan.aguero@gmail.com) Received: from mail-qy0-f174.google.com (mail-qy0-f174.google.com [209.85.221.174]) by mx1.freebsd.org (Postfix) with ESMTP id C079A8FC16; Wed, 6 Jan 2010 19:21:45 +0000 (UTC) Received: by qyk4 with SMTP id 4so7365834qyk.7 for ; Wed, 06 Jan 2010 11:21:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:date:from:to :cc:subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=UWD9wTMekwZ/hblEuftEl2qA733camrJb3iOzMSfE+s=; b=dyW1kGdcFrABS+HbVH9YPbulaG6XaNcsDQdTmjsktWWuqGxRAHU6nvPnLVpL/ZzcZs Y4RwbMbgxh7WoJOUaCxEtY+9rlH2dI+k4uS654yjA9KIqCHCra95QbQBhUPPWTihYW/Z BEqrd65h9X2itDrbLUrixYa42OoiDnQdLi/Rw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=XYfZ14hPEWl6G+YInWS9oVIvtFuj4vG9p29kYtD5hbJhzdLD7o475vtgpIz2u/pMAN oqvVQkb0943JNIX8nTg6wTrO9X26xi1sKcAvPjArXEJGPUWi4UeZ4PO6SZpUetGjd0Bh vwxmO6EMgmB9+KZ6BG1mWezSaBKvtMOLNzeu8= Received: by 10.224.92.145 with SMTP id r17mr3980196qam.35.1262805692714; Wed, 06 Jan 2010 11:21:32 -0800 (PST) Received: from sigma.iib.unsam.edu.ar (mx.unsam.edu.ar [200.45.170.30]) by mx.google.com with ESMTPS id 22sm778308qyk.2.2010.01.06.11.21.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 06 Jan 2010 11:21:31 -0800 (PST) Sender: Fernan Aguero Received: by sigma.iib.unsam.edu.ar (Postfix, from userid 1001) id AD7322001FD; Wed, 6 Jan 2010 16:21:25 -0300 (ART) Date: Wed, 6 Jan 2010 16:21:25 -0300 From: Fernan Aguero To: Pawel Jakub Dawidek Message-ID: <20100106192125.GF17808@iib.unsam.edu.ar> References: <20100105182920.GC12091@iib.unsam.edu.ar> <20100106175718.GB1719@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100106175718.GB1719@garage.freebsd.pl> User-Agent: Mutt/1.5.20 (2009-06-14) 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 19:21:46 -0000 +----[ Pawel Jakub Dawidek (06.Jan.2010 15:23): | | On Tue, Jan 05, 2010 at 03:29:20PM -0300, Fernan Aguero wrote: | > Hi, | > | > 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). | > | > 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). | > | > /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 | > | > gama# gstripe list | > Geom name: gs0 | > State: UP | > Status: Total=2, Online=2 | > 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 | > | > 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?) | > | > 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. | > | > I've been reading some posts, some man pages, and was | > tempted to try and delete gs0g and then use growfs. | > | > Would this work? I'd appreciate any tip or suggestion (or even a shout!) | > | > 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? | | From 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'. Hi Pawel, thanks for chiming in. Yes I see what you mean. But I'm confused regarding what this box has. Both of these return similar info: bsdlabel /dev/ad4s3 bsdlabel /dev/stripe/gs0 though the latter doesn't add the warnings (see below the output quoted in my first message) about partitions extendind past the end of the disk So, are the partitions done at the slice or at the stripe level? I'm afraid I don't have this documented in my notes, and I don't remember what I've done some years back! So summarizing, I do have i) slices on disks I guess I also have ii) partitions on slices And the output of 'gstripe list' shows I also have iii) stripe on slices Anyway, after using bsdlabel, and editing the partition table for this stripe/slice, if I delete partition 'g' and then add its size to partition 'f', would gstripe _just work_ with the extended partition? Or do I need to newfs the 'f' partition? Would growfs work on gs0f instead of newfs? thanks again, -- fernan | > where do I get the new size (XXXXXX) for growfs? | > Would 184757504 be OK? (from bsdlabel output, below): | > | > # /dev/ad4s3: | > 8 partitions: | > # size offset fstype [fsize bsize bps/cpg] | > c: 331558160 0 unused 0 0 # "raw" part, don't edit | > d: 20971520 16 4.2BSD 2048 16384 28552 | > e: 62914560 20971536 4.2BSD 2048 16384 28552 | > f: 62914560 83886096 4.2BSD 2048 16384 28552 | > g: 184757504 146800656 4.2BSD 2048 16384 28552 | > 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 | > | > | > This is on FreeBSD-6.4p8, i386 (RELENG_6_4) | | -- | Pawel Jakub Dawidek http://www.wheel.pl | pjd@FreeBSD.org http://www.FreeBSD.org | FreeBSD committer Am I Evil? Yes, I Am! | +----]