i need to upgrade a disk

Jerry McAllister jerrymc at msu.edu
Tue Nov 7 20:55:41 UTC 2006

On Tue, Nov 07, 2006 at 08:59:59AM -0600, Jonathan Horne wrote:

> i have a system that is FreeBSD 6.2-PRERELEASE, that i need to upgrade its 
> single disk.  id like to keep all its existing slices the same size, and then 
> use the unused space to create a new /opt slice.  would dd be the way to go?  
> if so, could someone advise on its proper usage for duplicating one disk to 
> another?

I presume you mean that you want to switch to a larger new disk.
If you can plug it in while the other one is still in place, then
use fdisk, bsdlabel and newfs (you can do this from within sysinstall 
if you want, but using them by themselves is not really hard) to make
your primary slice and divide it in to the partitions you want and 
build the filesystems in the partitions.

Mount the new file systems to temporary mount points such 
as /newroot /newusr, whatever, then mount them.

Then use dump/restore to transfer the contents of the filesystems
to their new homes.   It would look something like:

   cd /newroot
   dump 0af - / | restore -rf - 

   cd /newusr
   dump 0af - /usr | restore -rf -

etc for whatever partitions you want to move.
Preferably this dump/restore would be done in single user with
all files systems mounted and 'swapon -a'

Once you are done moving all file systems, shutdown, move the drives
and reboot.

This will get you the copied file systems you want and dd might not.


> or, if there is an alternative way to skin this cat, im willing to learn 
> whatever way might be the best.
> cheers,
> jonathan
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"

More information about the freebsd-questions mailing list