From owner-freebsd-fs@freebsd.org Thu Apr 20 14:30:45 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF49FD469DE for ; Thu, 20 Apr 2017 14:30:45 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [70.36.157.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7B2D820; Thu, 20 Apr 2017 14:30:45 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (localhost [IPv6:::1]) by chez.mckusick.com (8.15.2/8.15.2) with ESMTP id v3KEVN59061503; Thu, 20 Apr 2017 07:31:23 -0700 (PDT) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201704201431.v3KEVN59061503@chez.mckusick.com> From: Kirk McKusick To: Maxim Sobolev Subject: Re: UFS snapshot "file" is slightly bigger than underlying disk partition cc: FreeBSD Filesystems In-reply-to: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <61501.1492698683.1@chez.mckusick.com> Content-Transfer-Encoding: quoted-printable Date: Thu, 20 Apr 2017 07:31:23 -0700 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2017 14:30:45 -0000 > From: Maxim Sobolev > Date: Thu, 20 Apr 2017 02:39:12 -0700 > Subject: UFS snapshot "file" is slightly bigger than underlying disk par= tition > To: FreeBSD Filesystems , > Kirk McKusick > = > Hi Kirk, > = > I've noticed that the snapshot file is slightly bigger than underlying d= isk > partition. First I thought it's some kind of header attached to the end, > but the size of difference is actually dependent on the disk size. Is it= by > design, or some sort of "off by x" error? What's annoying about that is > that the size is not multiple of SECTOR_SIZE. Also looks like if I just = cut > that junk out resulting FS image is just as usable. > = > Attached script illustrates that. The first column is size of the > partition, the second column is the size of the difference, both in byte= s. > = > 1048576 48 > 2097152 56 > 4194304 72 > 8388608 72 > 16777216 72 > 33554432 72 > 67108864 72 > 134217728 72 > 268435456 72 > 536870912 72 > 1073741824 72 > 2147483648 72 > 4294967296 96 > 8589934592 152 > 17179869184 256 > 34359738368 464 > 68719476736 880 > 137438953472 1720 > 274877906944 3392 > 549755813888 6744 > = > Please advise, thanks. > = > -Max > (P.S. This is 11.0-RELEASE-p9) The extra space is for auxilary information that is used to track changes made in the snapshot. Removing it will cause your snapshot maintainance to slow down by 10-100x and in the worst case can cause it to become corrupt. In short, don't mess with it. Kirk McKusick