<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:11.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hello team.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We ran into some trouble in Gluster 9.3 with the Gluster NFS server. We updated to a supported Gluster 9.6 and reproduced the problem.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We understand the Gluster team recommends the use of Ganesha for NFS but in our specific environment and use case, Ganesha isn’t fast enough. No disrespect intended; we never got the chance to work with the Ganesha team on it.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We tried to avoid Ganesha and Gluster NFS altogether, using kernel NFS with fuse mounts exported, and that was faster, but failover didn’t work. We could make the mount point highly available but not open files (so when the IP failover
happened, the mount point would still function but the open file – a squashfs in this example – would not fail over).</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So we embarked on a mission to try to figure out what was going on with the NFS server. I am not an expert in network code or distributed filesystems. So, someone with a careful eye would need to check these changes out. However, what I
generally found was that the Gluster NFS server requires the layers of gluster to report back ‘errno’ to determine if EINVAL is set (to determine is_eof). In some instances, errno was not being passed down the chain or was being reset to 0. This resulted in
NFS traces showing multiple READs for a 1 byte file and the NFS client showing an “I/O” error. It seemed like files above 170M worked ok. This is likely due to how the layers of gluster change with changing and certain file sizes. However, we did not track
this part down.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We found in one case disabling the NFS performance IO cache would fix the problem for a non-sharded volume, but the problem persisted in a sharded volume. Testing found our environment takes the disabling of the NFS performance IO cache
quite hard anyway, so it wasn’t an option for us.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We were curious why the fuse client wouldn’t be impacted but our quick look found that fuse doesn’t really use or need errno in the same way Gluster NFS does.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So, the attached patch fixed the issue. Accessing small files in either case above now work properly. We tried running md5sum against large files over NFS and fuse mounts and everything seemed fine.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In our environment, the NFS-exported directories tend to contain squashfs files representing read-only root filesystems for compute nodes, and those worked fine over NFS after the change as well.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If you do not wish to include this patch because Gluster NFS is deprecated, I would greatly appreciate it if someone could validate my work as our solution will need Gluster NFS enabled for the time being. I am concerned I could have missed
a nuance and caused a hard to detect problem.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you all!</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">patch.txt attached.</p>
</div>
</body>
</html>