Date: Tue, 01 Oct 2013 12:12:54 -0700 From: Xin Li <delphij@delphij.net> To: Jordan Hubbard <jkh@mail.turbofuzz.com>, freebsd-fs@FreeBSD.org Subject: Re: zfs: the exponential file system from hell Message-ID: <524B1EB6.2020003@delphij.net> In-Reply-To: <BFAE1DDE-B8F8-40E5-9D9B-CF954D5D6457@mail.turbofuzz.com> References: <52457A32.2090105@fsn.hu> <77F6465C-4E76-4EE9-88B5-238FFB4E0161@sarenet.es> <20130930234401.GA68360@neutralgood.org> <BFAE1DDE-B8F8-40E5-9D9B-CF954D5D6457@mail.turbofuzz.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/01/13 09:33, Jordan Hubbard wrote: > > On Sep 30, 2013, at 4:44 PM, kpneal@pobox.com wrote: > >> Bottom line: The replacement for the 'df' command when using ZFS is >> 'zfs list'. > > Given that we have the sources to df, I guess we should consider the > question begged: Do we want to change it to DTRT for zfs > filesystems? There's no Unix Law™ that says "df(1) must use the > output of statfs(2) directly and can use no longer sources of > information!" > > At the end of the day, df(1) is just a convenient status reporting > tool aimed at human consumption. It could easily reach out to "zfs > list" for the data it prints for zfs volumes if what's reported by > statfs(2) just isn't suitable. I don't think 'zfs list' reports the "right" numbers either: there is no notion of "available shared space between this, this and this file systems". The underlying problem is that it's always hard to represent mutli-dimensional value in a linear manner, to do it, we would need to create something new. I think one of a more preciese way of representing free space on ZFS would be something like this: File system Nominal Free Breakdown tank 25TB 0 + 25TB/2 tank/foo 25.001TB 1G + 25TB/2 Where, the /2 means the space is shared by two consumers. In the above example, we have a pool of 25TB free space and: tank: no reserved space tank/foo: 1G of reserved space. (Note: this is actually oversimplificating, there is refreserve and reserve that has to be handled differently) Personally I don't really like this idea as it makes it too complicated for users to understand. It would be easier to represent the situation in a chart (or a piechart), like: * - tank X - tank/foo O - tank/foo/bar _ - reserved space in tank/foo/bar ! - performance warning limit +---+-------------------+--------------+ +***|XXXXXXXXXXX[OOOO__]| !!!| +---+-------------------+--------------+ And the largest box represents the whole space for a given volume. Cheers, -- Xin LI <delphij@delphij.net> https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?524B1EB6.2020003>