*BSD News Article 77156


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!howland.erols.net!newsfeed.internetmci.com!mcsun!EU.net!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!dispatch.news.demon.net!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail
From: brian@awfulhak.demon.co.uk (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: How to combine two file systems
Date: 29 Aug 1996 11:46:19 +0100
Organization: Coverform Ltd.
Lines: 44
Message-ID: <503sdr$bd@anorak.coverform.lan>
References: <4vgbqa$7r@ceil.fv.net> <4vl92p$6s8@uriah.heep.sax.de> <500l5b$2lo@ceil.fv.net>
NNTP-Posting-Host: localhost.coverform.lan
X-NNTP-Posting-Host: awfulhak.demon.co.uk
X-Newsreader: TIN [version 1.2 PL2]

Brian Bayorgeon (root@fv.net) wrote:

: # /dev/wd1s1:

: 8 partitions:
: #        size   offset    fstype   [fsize bsize bps/cpg]
:   a:   204800        0    4.2BSD        0     0     0 	# (Cyl.    0 - 203*)
:   b:   204800   204800      swap                    	# (Cyl.  203*- 406*)
:   c:  3173121        0    unused        0     0       	# (Cyl.    0 - 3147*)
:   e:   614400   409600    4.2BSD        0     0     0 	# (Cyl.  406*- 1015*)
:   f:  1943552  1024000    4.2BSD        0     0     0 	# (Cyl. 1015*- 2943*)
:   g:   205569  2967552    4.2BSD        0     0     0 	# (Cyl. 2944 - 3147*)


: I want to combine e and g...if I add the size of g to e, what
: happens to f?  I believe that new e will overlap into f....or
: not? f is my usr partition.....don't want to trash that!

Without doing something smart, your best bet is to use the "ccd" package
to "join" the partitions.

If you want to do something smart, and assuming you've got 2k blocks on your
disk (I can't tell from here), you could always write a program that does
the following:

    1.  Open /dev/rwd1s1
    2.  Seek to offset 1024000 * 2048
    3.  Start writing the info read to an offset 614400 * 2048 bytes less
	than where you.  Do this for 1943552 * 2048 bytes.

Then, umount your e, f and g partitions, run your program and change your
disklabel to read

         size    offset
e:    1943552    409600
f:     267009   2353152

newfs wd1s1f and change /etc/fstab to use wd1s1e for /usr.

Usual disclaimers..... *grin*

--
Brian <brian@awfulhak.demon.co.uk>
Don't _EVER_ lose your sense of humour....