From owner-freebsd-questions@freebsd.org Sun Apr 10 17:40:08 2016 Return-Path: Delivered-To: freebsd-questions@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 301BFB0B812 for ; Sun, 10 Apr 2016 17:40:08 +0000 (UTC) (envelope-from brandon.wandersee@gmail.com) Received: from mail-ig0-f169.google.com (mail-ig0-f169.google.com [209.85.213.169]) (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 08A20165C for ; Sun, 10 Apr 2016 17:40:07 +0000 (UTC) (envelope-from brandon.wandersee@gmail.com) Received: by mail-ig0-f169.google.com with SMTP id g8so54588280igr.0 for ; Sun, 10 Apr 2016 10:40:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=uYxlME8QS9lSKRnn+lady5SZZ5m4zMjb6ozFIMjCgGU=; b=A5Zmy+M6V5KCK56S5aEdGDfGu8RDwrq7XL+yk7v5vgSd3KPR1xMR91wU1oLIgILWz7 MDI37yrIAXiVSIeVs2a0sic1MzTNOq8O08Mzw0vVyys+X69DWl+8ZzgERLvMvwb6Pzro b0cGk2pu46MXj11QZjedVDnqLZFc850XX3cFTne+q3MczQ4W6A/akI1hzyxhwnXpfpuv 0XDNUQDs8VaUgvKwgazxDcgSjC+zb2EanRLiJR7mwhWXDH02DztTFqnIfsnOwPkRtXw4 cfJ19G6DRlViH3/T9+23C7ukYKsa10C/jXWvxu+Yhh9E+WmKxV1a6cdgBjZX4EoOQCb7 TZ7w== X-Gm-Message-State: AOPr4FWOZb/lE8L6l2iqRUYaCpdTL8sNYbJmPIKDQ4yY94xX50gIiq+3OQU6Lnn1F+SpJw== X-Received: by 10.50.142.2 with SMTP id rs2mr1900322igb.72.1460310000951; Sun, 10 Apr 2016 10:40:00 -0700 (PDT) Received: from WorkBox.Home.gmail.com (75-161-218-198.mpls.qwest.net. [75.161.218.198]) by smtp.gmail.com with ESMTPSA id cy7sm9561479igc.17.2016.04.10.10.39.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Apr 2016 10:39:59 -0700 (PDT) References: <20160410150013.4d34a49b@portege> <20160410155756.06c88114@portege> User-agent: mu4e 0.9.16; emacs 24.5.1 From: Brandon J. Wandersee To: Aleksander Alekseev Cc: "Dean E. Weimer" , freebsd-questions@freebsd.org Subject: Re: Stupid question regarding ZFS and `df -h` output In-reply-to: <20160410155756.06c88114@portege> Date: Sun, 10 Apr 2016 12:40:05 -0500 Message-ID: <86a8l1bbwq.fsf@WorkBox.Home> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2016 17:40:08 -0000 Aleksander Alekseev writes: > $ sudo gpart show > Password: > => 34 250069613 ada0 GPT (119G) > 34 6 - free - (3.0K) > 40 1024 1 freebsd-boot (512K) > 1064 984 - free - (492K) > 2048 4194304 2 freebsd-swap (2.0G) > 4196352 245872640 3 freebsd-zfs (117G) > 250068992 655 - free - (328K) > > $ sudo zpool status > pool: zroot > state: ONLINE > scan: none requested > config: > > NAME STATE READ WRITE CKSUM > zroot ONLINE 0 0 0 > ada0p3 ONLINE 0 0 0 > > errors: No known data errors > ``` > > Right, there is a swap partition. But I personally still don't > understand why ZFS partitions size is 117G and `df` shows weird numbers > like 95G and 74G. `df` will show you the correct amount of consumed and available space on a ZFS filesystem, but not the correct "size" of a filesystem, because (unless you've set a quota on a ZFS filesystem) there is no real "size." ZFS handles space differently than traditional filesystems, and since a ZFS pool fills the entirety of a disk partition, the "size" output of `df` doesn't really matter. If it were to display the "size" accurately, it would still show every "partition" as having the same size, totalling several times the size of your disk. The built-in equivalent `zfs list` doesn't even bother listing size, because it's irrelevant. -- :: Brandon J. Wandersee :: brandon.wandersee@gmail.com :: -------------------------------------------------- :: 'The best design is as little design as possible.' :: --- Dieter Rams ----------------------------------