gstripe: delete one, and enlarge another partition?

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Jan 6 17:57:18 UTC 2010


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'.

> 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 at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20100106/fa623020/attachment.pgp


More information about the freebsd-geom mailing list