From owner-freebsd-questions@FreeBSD.ORG Mon Feb 22 09:33:13 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8B17106566C for ; Mon, 22 Feb 2010 09:33:13 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 52C908FC08 for ; Mon, 22 Feb 2010 09:33:13 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.4/8.14.4) with ESMTP id o1M9X1i8088396 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 22 Feb 2010 09:33:01 GMT (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <4B824F4D.5010200@infracaninophile.co.uk> Date: Mon, 22 Feb 2010 09:33:01 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: Aiza References: <4B82416B.7050001@comclark.com> In-Reply-To: <4B82416B.7050001@comclark.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.95.3 at happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, SPF_FAIL autolearn=no version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions Subject: Re: Dump/restore to clone 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: Mon, 22 Feb 2010 09:33:14 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 22/02/2010 08:33, Aiza wrote: > What happened to swap? The fstab will be showing it as > the first file system on the hard drive slice. > Is something missing here? Swap isn't a filesystem. There's no persistent content in a swap partition, so there's nothing to copy. All you need to do is identify a partition as a swap area within /etc/fstab, and the system will initialise it automatically at boot-time. > What about the file system sizes. > Will the restored hard drive have the same > file system sizes as the source file system? No -- this is not necessary. So long as the target filesystem is sufficiently big to contain all of the contents of your dump, it should work fine. > Is there some way to allocate larger file systems > on the target without using sysinstall to prepare > the target beforehand? Certainly. sysinstall(8) really isn't the right tool for this sort of disk operation once you've got beyond doing an initial installation. For the default combination of UFS+MBR look at the following man pages: * fdisk(8) -- create and manage PC slices on the drive * boot0cfg(8) -- install/configure boot managers (not generally needed) * bsdlabel(8) -- create BSD partition tables within a slice * newfs(8) -- write a filesystem onto a partition There are alternatives nowadays: gpart(8) effectively replaces fdisk and bsdlabel on systems using GPT or EFI or various other technologies. zfs(8) similarly replaces bsdlabel and newfs if you want to use that for managing your disks. For more information see: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-adding.html and succeeding chapters http://lists.freebsd.org/pipermail/freebsd-geom/2009-April/003440.html http://wiki.freebsd.org/ZFS > Is there some command to display > the file system allocation size? df(1) shows you the size of filesystems, bsdlabel(8) shows you the size of the underlying partitions. Normally the filesystem will completely fill the partition it is created in, but it is possible to increase the size of a partition without increasing the size of the filesystem. There's not much point in doing that, as it just wastes space: growfs(8) can expand a filesystem to match the enclosing partition. To see the size of partitions via bsdlabel(1): # bsdlabel da0s1 # /dev/da0s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 67487663 4194304 4.2BSD 2048 16384 28552 b: 4194304 0 swap c: 71681967 0 unused 0 0 # "raw" part, don't edit 'size' is given here in units of 512byte sectors -- so the 'a' partiton is 32.2GiB. Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuCT00ACgkQ8Mjk52CukIxiBACfWFxImCy9AamOcH3+pafroBCw 404Ani9lZiKoEQzMOx7iQAZycUIS9Wec =a97y -----END PGP SIGNATURE-----