[Lustre-discuss] wrong free inode count on the client side with 1.8.7

Andreas Dilger adilger at whamcloud.com
Wed Jun 20 07:20:22 PDT 2012

On 2012-06-20, at 12:33 AM, Michael Kluge wrote:
> the number of free inodes seems to be reported wrongly on the client side. If I create files, the number of free inodes does not change. If I delete the files, the number of free inodes increases. So, from a client perspective, if I repeat to create and remove files, I can have more and more free inodes. I tried to find a bug for this in Whamcloud's database but could not find one. 'df -i' for the mdt on the MDS looks OK.
> I think behaviour is depicted here:
> http://lists.lustre.org/pipermail/lustre-discuss/2011-July/015789.html
> Right now I don't think this is a big problem. Can this turn into a real problem? Like when the number of free inodes as seen by the client exceeds 2^64 or  whatever is the limit there?

The free inode count reported for the MDT is min(inodes, blocks), so if the MDT is getting full the free inodes count will be under-represented.  In the worst case an external xattr block will be needed to store the layout for each inode.

If there are inodes used without allocating an xattr block (the common case) then more inodes will be reported.  This is necessary for programs that (naively) check statfs() to see if there is enough space in the filesystem for some operation.  It will be possible to create at least as many files as reported free inodes, assuming no other program is also creating files at the same time.

Cheers, Andreas
Andreas Dilger                       Whamcloud, Inc.
Principal Lustre Engineer            http://www.whamcloud.com/

More information about the lustre-discuss mailing list