From owner-freebsd-questions@FreeBSD.ORG Tue Nov 7 20:55:41 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7415B16A494 for ; Tue, 7 Nov 2006 20:55:41 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D9ED43D4C for ; Tue, 7 Nov 2006 20:55:39 +0000 (GMT) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id kA7Kseo8068687; Tue, 7 Nov 2006 15:54:40 -0500 (EST) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id kA7Ksew9068686; Tue, 7 Nov 2006 15:54:40 -0500 (EST) (envelope-from jerrymc) Date: Tue, 7 Nov 2006 15:54:40 -0500 From: Jerry McAllister To: Jonathan Horne Message-ID: <20061107205439.GB68598@gizmo.acns.msu.edu> References: <200611070900.01897.freebsd@dfwlp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200611070900.01897.freebsd@dfwlp.com> User-Agent: Mutt/1.4.2.2i Cc: freebsd-questions@freebsd.org Subject: Re: i need to upgrade a disk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Nov 2006 20:55:41 -0000 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? No. 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. ////jerry > > 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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"