Date: Mon, 19 Aug 2013 21:46:50 -0700 From: Artem Belevich <art@freebsd.org> To: aurfalien <aurfalien@gmail.com> Cc: freebsd-fs <freebsd-fs@freebsd.org> Subject: Re: du which understands ZFS Message-ID: <CAFqOu6hpp7%2BcdSNOJkoRqc3MR-mVaLJ4HXBfP3Dq7tLgeo--qw@mail.gmail.com> In-Reply-To: <F85B151C-2750-4306-A6DC-E600AB7A7438@gmail.com> References: <F85B151C-2750-4306-A6DC-E600AB7A7438@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 19, 2013 at 8:51 PM, aurfalien <aurfalien@gmail.com> 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" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFqOu6hpp7%2BcdSNOJkoRqc3MR-mVaLJ4HXBfP3Dq7tLgeo--qw>