From owner-freebsd-fs@FreeBSD.ORG Tue Aug 20 04:46:51 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D936DEBD for ; Tue, 20 Aug 2013 04:46:51 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-vb0-x22e.google.com (mail-vb0-x22e.google.com [IPv6:2607:f8b0:400c:c02::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 98C0D2F34 for ; Tue, 20 Aug 2013 04:46:51 +0000 (UTC) Received: by mail-vb0-f46.google.com with SMTP id p13so3778782vbe.33 for ; Mon, 19 Aug 2013 21:46:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=EU8RKf40WvX8VvWPj+6MPj3zJH/dNA8McheblPdy//Q=; b=bxLTjJ5OXP6gjBxwX3k8fO8uMuibHEaGt79dCTrHddR4OBMTg8afZH8gNalBgXkLqq ju7YirUkBKjEqkILpjk4AQOWDvhj15WeNrODUFud9Mclj2V9mAZfM5NyD+h9II9Q+7YZ PReQvRBb0ZwrfPwDYBmMwRrdaLeT0Zf2P8cYhq9aeQAtGj3TQTNLKsmqkBOOoa+N3lXv wqLAy5gGPVnXhirpEaCIEY0r2MB+TOD78mWyOUsvXRV+JlCEQ3rqUv2fsfQKy9wswC7d 7qA+QGFyXTGsOBvNp5A8qM2Af/OV3QHmtTYZCR7p4nhhw5boFuNbYOUVXGLJ6O4JzSJ3 XE9A== MIME-Version: 1.0 X-Received: by 10.58.165.70 with SMTP id yw6mr9832960veb.19.1376974010731; Mon, 19 Aug 2013 21:46:50 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.220.68.205 with HTTP; Mon, 19 Aug 2013 21:46:50 -0700 (PDT) In-Reply-To: References: Date: Mon, 19 Aug 2013 21:46:50 -0700 X-Google-Sender-Auth: 3NakGVSn4qWNdpMqtt2HSMdvnpo Message-ID: Subject: Re: du which understands ZFS From: Artem Belevich To: aurfalien Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-fs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 04:46:51 -0000 On Mon, Aug 19, 2013 at 8:51 PM, aurfalien wrote: > Hi, > > Is there a version of du which understands ZFS? > > Currently when running du I get this; > I guess you meant 'df'. Alas, the answer seems to be 'no, there's no ZFS-aware df'. The reason for that is that df gets its info via statfs(2) call and the only info it gets back is total number of blocks and available number of blocks. It's assumed that used space equals total-available. It worked well enough for other filesystems where it was filesystem that was managing disk space. ZFS obviously violates this assumption as available space is actually property of the pool, not of the filesystem, so ZFS has to lie about total size in order to present (arguably more important) amount of used and available space in a consistent way. --Artem > Filesystem Size Used Avail Capacity Mounted on > abyss 51T 50k 51T 0% > /abyss > abyss/PROJECT 72T 20T 51T 29% > /abyss/PROJECTS > abyss/PROJECTX 54T 2.6T 51T 5% /abyss/PROJECTSX > > The zpool of abyss is 75TB in size. > > - aurf > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" >