Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Nov 2003 09:48:10 -0500 (EST)
From:      Jerry McAllister <jerrymc@clunix.cl.msu.edu>
To:        roland@thegreentree.org (Roland Giesler)
Cc:        questions@freebsd.org
Subject:   Re: Resizing disk labels
Message-ID:  <200311251448.hAPEmBT07232@clunix.cl.msu.edu>
In-Reply-To: <NFEBLNMJLPMABJMOEINDMEFGCIAA.roland@thegreentree.org> from "Roland Giesler" at Nov 25, 2003 03:03:08 PM

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Thanks Konrad,
> 
> Yes, you're right, I mean file systems.  I've only been using FreeBSD for
> bit more than a month, so I'm still getting used to the different
> terminology (being used to MS).
> 
> Could I do this process "live", ie. could I FTP the content for "/usr" to
> another machine, delete the "/usr" filesystem, grow "/" to let's say 1GB,
> recreate "/usr" and copy the data back?  If I understand things correctly,
> then "/usr" holds apps and other stuff, but not the files essential to
> starting and operating FreeBSD.  So I should be follow this course of
> action?

Basically no, you can't do that because you need what is in /usr to 
do it and growfs will only grow a file system if there is enough extra
contiguous space.    What you would need to do is use dump(8) to make a 
backup on to some media, probably tape or a second disk, of each of the
filesystems you have (except /tmp) and then put in the installation CD
and use it to completely rebuild the file systems and then restore(8)
the contents of the file systems from the backups.

I think somewhere in these postings you mentioned you had 13 GBytes
unused at the end of the disk (unless that is another thread I had
confused with this one).

If that is true, you could sort of migrate all the filesystems down
one at a time providing you haven't used up all the partition identifiers 0
you can go up to 'h'.   Make a new partition (say 'h') of the un-used 
space and newfs it and mount it with a scratch name.  Move the current 
highest addressed file system in to it using dump/restore and then 
unmount both and mount the new one as whatever the old one was called.
Then remake the old one and move the next lower addressed file system
in to it and remount stuff, and so on until you have empty space next 
to root.  Then you can growfs root.   I am not sure how to make sure
it recognizes that the space next to root that was formerly taken up
by a file system is now not a part of one, though.   

If you have a second hard disk of the same or at least adequate size,
by far the easiest thing would be to build everything like you really 
want on that disk and then just switch them.   Make sure you put the MBR 
on it when you do the fdisk (eg write /boot/boot0 on it) and make the 
disk bootable with disklabel.  (that includes writing a bootrecord - 
eg /boot/boot1 on the FreeBSD slice and marking it bootable, all of 
which disklabel does if told to)

////jerry

> 
> Thanks again
> 
> Roland Giesler
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311251448.hAPEmBT07232>