From owner-freebsd-fs@freebsd.org Thu Apr 20 09:39:14 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 0DE67D47DD1 for ; Thu, 20 Apr 2017 09:39:14 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D51D48F5 for ; Thu, 20 Apr 2017 09:39:13 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-io0-x22e.google.com with SMTP id o22so67565980iod.3 for ; Thu, 20 Apr 2017 02:39:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:from:date:message-id:subject:to; bh=hdt5YhDm7cwr2nSXzNm8SbfZoat6OX+oddmWwsH82EU=; b=JP+djVDJ4ALAFcQ0WHHPZ5uiUV1KQV+Zz4r8x24Vlrk+RCv0GIRpCJfqf8IODjSy+R NUVErNqeN8Jsrm/6Cc/2+cIKuJbuIQLdrhnyglGjhB3kglJE+m2B30UeuugmE3LSQzKV zaTw8FHjqGgYG5EM9cCv0QO/cjLiohNq5VErVW2g6JG+obY3pfslTQFERVkRLvDd+t/3 xc5gvkPKXRyriQRPqLt05upameGGRDHQCaMC8NzZCEPWVDri/VFR8BY3eJk3BOm+oxz9 ZaQ41MmKAxUq2/gZkmO8eXZWkoD2SzqDPBA/mLc/yc/zJ3obS2xNMwyj1PV0+ZaIsC4T uoJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=hdt5YhDm7cwr2nSXzNm8SbfZoat6OX+oddmWwsH82EU=; b=R/DBa/+WkUSdoKKmwROY5zgzQJmFIpbY5PDLE4JcMuVFbfhFNllfMZTuXYf0Zcbql8 kCXWIm3dwSfVIfjQbAm9+YOlQOGEUawzquXcQ1te0bNqPdKY+Mk8zhiYM9NYw6szuE6+ EIHL3CQbYEHUlvNtyfFS9Qin6PqqirY/MF7eOLaIX6FacO34JUgxJBKJPLhAhlNodAnx CkZULtxjvgz/2D4TTWqiB5akkWrbPGoqpEnM4I9eb0uEMbK1mNJUdwtYHVCyw4tnyOT3 DcgIikHRbDZBPgLzbEhvoVUSkoqjiFXro9E8GUDkYkpdmwZ8wVchH90wk1h8UPCDAVCf MX/g== X-Gm-Message-State: AN3rC/4HFLwdqndUaZMkyowUzXUPIe6bC5H9iWtC0yqwMLAjdFc7xWIY vrbIh8BGJxesy682D+FZVWV9Vb2IyQWNd1s= X-Received: by 10.107.138.7 with SMTP id m7mr7810853iod.133.1492681152923; Thu, 20 Apr 2017 02:39:12 -0700 (PDT) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.36.102.193 with HTTP; Thu, 20 Apr 2017 02:39:12 -0700 (PDT) From: Maxim Sobolev Date: Thu, 20 Apr 2017 02:39:12 -0700 X-Google-Sender-Auth: Lfm5pOQotlJmVRD8FCeU0uwdkBo Message-ID: Subject: UFS snapshot "file" is slightly bigger than underlying disk partition To: FreeBSD Filesystems , Kirk McKusick Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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 09:39:14 -0000 Hi Kirk, I've noticed that the snapshot file is slightly bigger than underlying disk 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 bytes. 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)