<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>I did a strace on the binary and saw this</span></div><div>open("file-0.txt", O_RDONLY) = -1 EOVERFLOW (Value too large for defined data type)</div><div><br></div><div>Punching the error into google led me here</div><div>http://www.gluster.org/faq/index.php?action=artikel&cat=5&id=56&artlang=en</div><div><br></div><div>It talks about nfs but the solution (-D_FILE_OFFSET_BITS=64)</div>
<div> works when I add it to the gcc compile line. <br></div><div><br></div><div>Brian<br><span></span></div><div><span></span></div><div><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Brian Pontz <axehind007@yahoo.com><br><b><span style="font-weight: bold;">To:</span></b> "Gluster-users@gluster.org" <Gluster-users@gluster.org><br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, November 1, 2011 4:01 PM<br><b><span style="font-weight: bold;">Subject:</span></b> [Gluster-users] 32 bit and 64 bit<br></font><br>
<meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv829071995"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>Hi,</div><div><br></div><div>I'm testing out gluster 3.2.4 with 2 bricks and a few clients using the gluster client. The clients are FC14 and the bricks are running CentOs 6.</div><div>The problem I'm seeing is that when I have/use 32 bit compiled binaries that have to open large files, they cant do it on gluster, but they can do it on NFS. <br></div><div>I'm wondering why this is....</div><div><br></div><div>A example.</div><div><br></div><div>>df -T /gfs<br>Filesystem Type 1K-blocks Used Available Use% Mounted on<br>fs2:/GFS<br> fuse.glusterfs 11368538112 2791284608 8577253504 25%
/gfs<br></div><div><br></div><div>>pwd<br>/gfs</div><div>>cat file.c <br>#include <stdio.h><br>#include <stdlib.h><br><br>#define
BUFSIZE 1024<br><br>int main(int argc, char *argv[])<br>{<br> FILE *fp;<br><br> fp = fopen(argv[1], "r");<br> if (fp == NULL)<br> {<br> printf("Couldnt open file %s\n", argv[1]);<br> exit (0);<br> }<br><br> fclose(fp);<br><br> return 0;<br>} <br></div><div>>gcc -m32 -Wall -O2 file.c -o file</div><div>>ls -hs file-0.txt <br>9.6G file-0.txt<br></div><div>>./file file-0.txt <br>Couldnt open file file-0.txt<br></div><div>>gcc -m64 -Wall -O2 file.c -o file<br></div><div>>./file file-0.txt</div><div>><br></div><div><br></div><div><br></div><div>Then on the nfs mount...<br></div><div><br></div><div>>df -T /nfs<br>Filesystem Type 1K-blocks Used Available Use% Mounted on<br>nfs1:/nfs<br> nfs
5184863200 4845371648 76115680 99% /nfs<br></div><div>>pwd</div><div>/nfs</div><div>>gcc -m32 -Wall -O2 file.c -o file</div><div>>ls -hs file-0.txt</div><div>9.6G file-0.txt</div><div>>./file file-0.txt <br></div><div>></div><div>>gcc -m64 -Wall -O2 file.c -o file<br>
</div>
<div>>./file file-0.txt</div>
<div>><br>
</div>
<div> </div><div><br></div><div>I'm wondering why the 32 bit binary has no trouble on a standard nfs mount but it does have trouble on the gluster mount with the gluster client.<br></div><div><br></div><div>Thanks,</div><div>Brian<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div></div></div></div></div><meta http-equiv="x-dns-prefetch-control" content="on"><br>_______________________________________________<br>Gluster-users mailing list<br><a ymailto="mailto:Gluster-users@gluster.org" href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br><a href="http://gluster.org/cgi-bin/mailman/listinfo/gluster-users" target="_blank">http://gluster.org/cgi-bin/mailman/listinfo/gluster-users</a><br><br><br></div></div></div></body></html>