From owner-freebsd-fs@FreeBSD.ORG Fri Apr 13 15:49:42 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F38A9106566C for ; Fri, 13 Apr 2012 15:49:41 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id C61BF8FC0A for ; Fri, 13 Apr 2012 15:49:41 +0000 (UTC) Received: by dadz14 with SMTP id z14so13337539dad.17 for ; Fri, 13 Apr 2012 08:49:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=pf1cG1MXpTrue2jaxnsqmGMp7sB5pDAvYi8IjIPzS4M=; b=KTAWN6gOn2T6+Do5Z2VNrx0gTrMCHfZMAnGDuEKdWZzmtbVHR9byLzgHDNvfrLvOTD pybvPnJaREeJg5P2BQ7IZDP9jfbsjH9AHTgG5spZIH/0HGa38DvSqbmbSC5hlweZ4JXf tgcgfq/nvrfk49HiJvTxk/keVRSbXyvSeaug1P84aFw0opA/JcLO4evSQqjzx60O+n0x hPiWTnDnBDdcSyeBMuCML0ri67D7aVsQScbdufs598KQm/vy2QwyJlhSaxEzIeb3fX7+ Z9UYAUusa0dAC+8Pccyt0gQWzZ3Tnj94Z6S1kIkWeZhbiOpl2VjEnGqWPuHe3ecIkQ4j XQ8g== MIME-Version: 1.0 Received: by 10.68.132.36 with SMTP id or4mr5547653pbb.115.1334332180575; Fri, 13 Apr 2012 08:49:40 -0700 (PDT) Received: by 10.68.42.7 with HTTP; Fri, 13 Apr 2012 08:49:40 -0700 (PDT) In-Reply-To: References: <4F8825E5.3040809@gmail.com> <1334323707.4f8829fbe801e@www.hyperdesktop.nl> Date: Fri, 13 Apr 2012 08:49:40 -0700 Message-ID: From: Freddie Cash To: Johannes Totz Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@freebsd.org Subject: Re: ZFS and disk usage 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: Fri, 13 Apr 2012 15:49:42 -0000 On Fri, Apr 13, 2012 at 8:45 AM, Freddie Cash wrote: > On Fri, Apr 13, 2012 at 8:27 AM, Johannes Totz wrote: >> Without checking the numbers myself... >> Note that zpool and zfs do not agree on (free) space accounting: zpool >> shows "raw" space, whereas zfs includes metadata overhead for itself. >> >> Small rant: I dont understand why zpool and zfs show different things. >> If you have an integrated storage stack then why not show consistent >> numbers? Is there any use for this extra (mis-)information that >> zpool-vs-zfs provides? > > There's a great posting about the differences in the zfs-discuss > mailing list archives, although I can't find a reference to it at the > moment. =C2=A0Going from memory, the breakdown is something like: Here's one of them: http://mail.opensolaris.org/pipermail/zfs-discuss/2010-April/040180.html Message details: On Sun, Apr 18, 2010 at 20:08, Harry Putnam wrote: > Seems like you can get some pretty large discrepancies in sizes of > pools. and directories. They all answer different things, sure, but they're all things that an administrator might want to know. > zpool list "How many bytes are in use on the storage device? How many unallocated bytes are there?" > zfs list "If I have to ship this filesystem to another box (uncompressed and not deduped) how many bytes is that?" > du "How many bytes are used to store the contents of the files in this directo= ry?" and "ls -l": "How many bytes are addressable in this file?" > Do no other administrators feel the > need to know accurate sizes? It's important to consider what you want this data for. Considering upgrading your storage to get more room? Check out "zpool list". Need to know whether accounting or engineering is using more space? Look at "zfs list". Looking at a sparse or compressed file, and want to know how many bytes are allocated to it? "du" does the trick. Planning to email someone a file, and want to know if it'll fit in their 10MB quota? "ls -l" is the relevant command. In short, there are many commands because there are many answers, and many questions. No single tool has all the information available to it. Will --=20 Freddie Cash fjwcash@gmail.com