From owner-freebsd-questions@FreeBSD.ORG Sun Feb 21 13:31: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 B6A4A1065670 for ; Sun, 21 Feb 2010 13:31: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 41CC68FC13 for ; Sun, 21 Feb 2010 13:31: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 o1LDUjE1074110 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 21 Feb 2010 13:30:45 GMT (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <4B813584.5080705@infracaninophile.co.uk> Date: Sun, 21 Feb 2010 13:30:44 +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: <4B80ABBA.9000707@comclark.com> <20100221110358.9ec8b286.freebsd@edvax.de> <4B812C8F.40102@comclark.com> In-Reply-To: <4B812C8F.40102@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 , Polytropon Subject: Re: Dump questions 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: Sun, 21 Feb 2010 13:31:13 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 21/02/2010 12:52, Aiza wrote: > Polytropon wrote: >> On Sun, 21 Feb 2010 11:42:50 +0800, Aiza wrote: >>> 1. Using the -L flag to create a snapshot of the >>> live running file system. >>> >>> Does this mean that a complete copy of the file >>> system is written to .snap directory? >> >> No. The snapshot, quite incorrectly explained, is a saved >> delta between the file system on disk at a given state, to >> fixate further modifications (that are not included in the >> dump, of course). >> > > Sorry, I read your words but have no clue as what you are trying to say > with that statement. As i understand 'delta' to mean, the difference in > file system content between a point in time 'A' and 'B' some point in > time later in the future. Now just what is snapshot recording between > point 'A' and 'B' and how does that apply to what dump is going to read > and write? In horrendously simplified terms, the way snapshots work is this. Whenever there would be a write to a disk block, instead of overwriting the original block, the content is copied and written out to a previously unused disk block. The original block is preserved temporarily while the snapshot is active -- so the snapshotted data you see is the comprised of: * All the disk blocks that haven't been altered during the lifetime of the snapshot * The original, unchanged disk blocks which have been replaced by modified copies in the live filesystem. ZFS always does the copy-on-write thing, so it's a very natural and very fast operation to create snapshots with it -- often described as 'snapshots for free' -- and you can have as many as you want. UFS doesn't do CoW by default (AFAIR) so creating a snapshot under UFS means toggling the default behaviour and initialising some data structures to keep track of the disk blocks that belong to each snapshot. This means it will take a few seconds to create and you can only have a limited number of snapshots per filesystem active simultaneously. In either case, the space used for the snapshot corresponds to the amount of changes made to the filesystem since the snapshot was created. Thus on an active fs, snapshot space usage will go up over time. However, the amount used will generally be a fairly small percentage of the total space on the device, and all the extra space is recovered when the snapshot is released. 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/ iEYEARECAAYFAkuBNYQACgkQ8Mjk52CukIzETQCfdnu2W7BBRVrc1T2H3MPWMA1G KWsAnj6E2hZ3m2WTtMfTfqZ89sWzxaB8 =jOeb -----END PGP SIGNATURE-----