From owner-freebsd-questions@FreeBSD.ORG Wed Dec 5 15:46:35 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F4A916A418 for ; Wed, 5 Dec 2007 15:46:35 +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 6445913C46E for ; Wed, 5 Dec 2007 15:46:35 +0000 (UTC) (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 lB5Ffm01022020; Wed, 5 Dec 2007 10:41:48 -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 lB5Ffmbo022019; Wed, 5 Dec 2007 10:41:48 -0500 (EST) (envelope-from jerrymc) Date: Wed, 5 Dec 2007 10:41:48 -0500 From: Jerry McAllister To: Steve Franks Message-ID: <20071205154148.GB21074@gizmo.acns.msu.edu> References: <539c60b90712041638s78b4e40fn67434f2dce5e27e7@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <539c60b90712041638s78b4e40fn67434f2dce5e27e7@mail.gmail.com> User-Agent: Mutt/1.4.2.2i Cc: User Questions Subject: Re: copying just / (not /tmp, /usr, etc) (rsync -x failed) 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: Wed, 05 Dec 2007 15:46:35 -0000 On Tue, Dec 04, 2007 at 05:38:20PM -0700, Steve Franks wrote: > I have / on one slice, and [usr,tmp,var] on others. I want to move > just / to a new disk, which seemed to be what rsync -x ("do not cross > filesystems") was intended for. It failed, however, as df shows 20k > blocks in /, and rsync filled up the target slice with 50k blocks, so > obviously it blew right past the 'end' of / - did I miss something? Is > there no other way except to umount [tmp,usr,var]? I would use dump/restore. Build the filesystem in the new disk partition with fdisk, bsdlabel and newfs as needed. Then mount the new partition somewhere - example: mkdir /newpart mount /dev/ad1s1a /newpart (presuming new disk is ad1, slice is 1, partition is a) Doesn't hurt to do an fsck on it here before writing to it, but it probably isn't really needed. Then, run the dump/restore cd /newpart dump 0af - / | restore -rf - This will get all of / as you want. The other mountpoints for /tmp, /usr and /var will be copied, but not the contents of those filesystems. You probably want that. ////jerry > > Thanks, > Steve > _______________________________________________ > 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"