From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 22:23:02 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19CC016A407 for ; Wed, 26 Apr 2006 22:23:02 +0000 (UTC) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D31243D45 for ; Wed, 26 Apr 2006 22:23:01 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.19.131]) ([10.251.19.131]) by a50.ironport.com with ESMTP; 26 Apr 2006 15:23:00 -0700 Message-ID: <444FF2C4.3040804@elischer.org> Date: Wed, 26 Apr 2006 15:23:00 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <444FA4CF.7040507@outblaze.com> <444FD6CB.2080805@centtech.com> <20060426202945.GA72171@xor.obsecurity.org> In-Reply-To: <20060426202945.GA72171@xor.obsecurity.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: Do I need to reserve disk space for UFS snapshots? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 22:23:02 -0000 Kris Kennaway wrote: >On Wed, Apr 26, 2006 at 03:23:39PM -0500, Eric Anderson wrote: > > >>Kent Ho wrote: >> >> >>>Hi, >>> >>>I'm planing to use FreeBSD snapshots. It seems to be the snapshop image >>>is placed on the same file system. The question is how do I manage or >>>reserve space for the snapshots? Can someone give me some guidelines or >>>pointers. >>> >>>Here's my netapp it has a separate area allocated for the snapshots, I'm >>>keeping 2 weekly snapshots in there(weekly.0 & weekly.1) using around 30G. >>> >>>Filesystem kbytes used avail capacity Mounted on >>>/vol/vol0/ 305052552 272495320 32557232 89% /vol/vol0/ >>>/vol/vol0/.snapshot 76263136 30658028 45605108 40% >>>/vol/vol0/.snapshot >>> >>>Filesystem iused ifree %iused Mounted on >>>/vol/vol0/ 10802387 89822586 11% /vol/vol0/ >>> >>>If copy all content in vol0 to a FreeBSD and make 2 snapshot will it be >>>around the same? 272G + 30G = 302G? So if I df on the FreeBSD box >>>around 302G will be used? >>> >>>Any help and information is highly appreciated. >>> >>> >>FreeBSD snapshots do not work the same way as NetApp snapshots. First, >>they must reside on the same filesystem as the snapshotted filesystem. >>They will initially eat up some space upon creation equal to the space >>used by the cylinder group summaries and superblocks, but it isn't a >>whole lot. You'll need to have however much space is changed weekly for >>each snapshot, so if 10Gb per week is changed, then you'll need that >>much space per snapshot file done. >> >> Kent, The best way to think of UFS snapshots is to consider that there are two filesystems on the same media. They share a lot of data when they are in sync (just after the snapshot is created) so there is very little overhead.. (think of it as a bit like having all the files linked). As the files on the live filesystem are changed, the blocks that hold the original data are unlinked from the live filesystem, and replaced by new blocks that hold the new data. They continue to be linked into the snapshot filesystem however. So the overhead grows to be the size of the difference between the live filesystem, and the snapshot.