Subject: Re: ffs manipulations ?
To: Philippe St-Jacques <h0ho@hotmail.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-i386
Date: 02/03/2003 21:18:10
On Sun, Feb 02, 2003 at 09:12:26PM +0000, Philippe St-Jacques wrote:
> Hi. I want to know what commands/tools are available to resize/delete/move 
> my ffs slices in my partition.
> Here is my disklabel:
> 
> 16 partitions:
> #        size    offset     fstype  [fsize bsize cpg/sgs]
> a:   4237632  21848400     4.2BSD   1024  8192    86   # (Cyl. 21675 - 
> 25878)
> b:   8390592  26086032       swap                      # (Cyl. 25879 - 
> 34202)
> c:  95418288  21848400     unused      0     0         # (Cyl. 21675 - 
> 116335)
> d: 117266688         0     unused      0     0         # (Cyl.    0 - 
> 116335)
> e:  10649520  34476624     4.2BSD   1024  8192    86   # (Cyl. 34203 - 
> 44767)
> f:  16793280  45126144     4.2BSD   1024  8192    86   # (Cyl. 44768 - 
> 61427)
> g:  20889792  61919424     4.2BSD   1024  8192    86   # (Cyl. 61428 - 
> 82151)
> h:  16793280  82809216     4.2BSD   1024  8192    86   # (Cyl. 82152 - 
> 98811)
> i:  17664192  99602496     4.2BSD   1024  8192     0   # (Cyl. 98812 - 
> 116335)
> j:   3903795   4690980 Linux Ext2      0     0         # (Cyl. 4653*- 8526*)
> k:   8610777   8594838 Linux Ext2      0     0         # (Cyl. 8526*- 
> 17069*)
> l:   4642722  17205678 Linux Ext2      0     0         # (Cyl. 17069*- 
> 21674)
> 
> I want to delete slice 'g' and attribute it's space to 'f'.

You can do this with disklabel -e (or disklabel -i)
but this will only resize the partition, not the filesystem in it.
The safer way is to backup it, and newfs f again.
there is a tool called fsresize (or something like that) available from
ftp://ftp.netbsd.org/pub/NetBSD/misc/mouse/hacks/
But I never tried it. I don't even know if it still compiles.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--