NFS inode count differs from ZFS

frush

Cadet
Joined
Nov 26, 2018
Messages
4
So, I've noticed an interesting behavior. My FreeNAS reports a huge number of inodes (~4B) for one of my filesystems, but my NFS client shows a much smaller number. At one point yesterday a tool that I'm using reported that the filesystem had 100% of it's inodes used. That appeared to be a transient issue as the number of available inodes reported when I checked are shown below.

The number of available inodes as reported by FreeNAS is larger and 2^32, and seems a bit arbitrary since the 'available' and 'ifree' numbers reported by 'df' are the same on the FreeNAS device.

I'm wondering if anyone else has observed this issue, and if they know of a workaround to have a more accurate reporting of inodes via NFSv4?

Thanks.

Diagnostic info:
FreeNAS: FreeNAS-11.2-RELEASE-U1
share is NFSv4
volume 'backups' has a quota of 6TiB, with 4TIB used, and is allocated out of a larger pool that is roughly 32TiB
Client : OL7 (RHEL7).

root@MYFREENAS:~ # df -iP /mnt/MYVOL_00/backups
Filesystem 512-blocks Used Avail Capacity iused ifree %iused Mounted on
MYVOL_00/backups 12884901888 8523810702 4361091186 66% 72440515 4361091186 2% /mnt/MYVOL_00/backups


[frush@NFS_CLIENT ~]$ df -iP /mnt/backups/
Filesystem Inodes IUsed IFree IUse% Mounted on
MYFREENAS:/mnt/MYVOL_00/backups 138564405 72440515 66123890 53% /mnt/backups


[frush@NFS_CLIENT ~]$ mount
MYFREENAS:/mnt/MYVOL_00/backups on /mnt/backups type nfs4 (rw,relatime,vers=4.1,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=xxx.yy.zzz.42,local_lock=none,addr=xxx.yy.zzz.218)



---
Ray Frush
Colorado State University
 
D

dlavigne

Guest
It may be related to this: while ZFS has 64-bit inode numbers, the rest of FreeBSD 11 still has 32-bit. Only 12 got full 64-bit inodes.
 

frush

Cadet
Joined
Nov 26, 2018
Messages
4
It may be related to this: while ZFS has 64-bit inode numbers, the rest of FreeBSD 11 still has 32-bit. Only 12 got full 64-bit inodes.

The values I'm seeing seem to jump around arbitrarily though. The number of inodes reported belonging to this dataset shrank down below 2^32, and today the inode count from 'df' on both the FreeNAS and the client agree. What drives the inode count of a dataset with a quota?


root@MYFREENAS:~ # df -i /mnt/MYVOL/backups/ Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on MYVOL/backups 6442450944 4333049684 2109401259 67% 72825368 4218802519 2% /mnt/MYVOL/backups[/FONT] [FONT=courier new][]$ df -iP /mnt/backups Filesystem Inodes IUsed IFree IUse% Mounted on MYFREENAS:/mnt/MYVOL/backups 4291627887 72825368 4218802519 2% /mnt/backups[/FONT]
 
D

dlavigne

Guest
Did you find the answer to your question? If not, you may want to ask on a FreeBSD mailing list or the FreeBSD forums.
 

frush

Cadet
Joined
Nov 26, 2018
Messages
4
The issue of 32bit vs 64bit inode numbers does seem to adequately explain the view of the file system from the NFS client, which seems to be seeing a truncated (to 32 bits) value. However, no answers to why the volume has been reporting a variable number of total inodes is not clear. Since my instance seems to have settled down for now, I haven't pursued it as I've had many other things that required my attention.
 
Top