[Gluster-users] 32 bit and 64 bit

Brian Pontz axehind007 at yahoo.com
Tue Nov 1 22:13:05 UTC 2011


I did a strace on the binary and saw this
open("file-0.txt", O_RDONLY)            = -1 EOVERFLOW (Value too large for defined data type)

Punching the error into google led me here
http://www.gluster.org/faq/index.php?action=artikel&cat=5&id=56&artlang=en

It talks about nfs but the solution (-D_FILE_OFFSET_BITS=64)
works when I add it to the gcc compile line. 


Brian




________________________________
From: Brian Pontz <axehind007 at yahoo.com>
To: "Gluster-users at gluster.org" <Gluster-users at gluster.org>
Sent: Tuesday, November 1, 2011 4:01 PM
Subject: [Gluster-users] 32 bit and 64 bit


Hi,

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.
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. 

I'm wondering why this is....

A example.

>df -T /gfs
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
fs2:/GFS
    fuse.glusterfs   11368538112 2791284608 8577253504  25% /gfs


>pwd
/gfs
>cat file.c 
#include <stdio.h>
#include <stdlib.h>

#define
 BUFSIZE 1024

int main(int argc, char *argv[])
{
  FILE *fp;

  fp = fopen(argv[1], "r");
  if (fp == NULL)
  {
     printf("Couldnt open file %s\n", argv[1]);
     exit (0);
  }

  fclose(fp);

  return 0;
} 

>gcc -m32 -Wall -O2 file.c -o file
>ls -hs file-0.txt 
9.6G file-0.txt

>./file file-0.txt 
Couldnt open file file-0.txt

>gcc -m64 -Wall -O2 file.c -o file

>./file file-0.txt
>



Then on the nfs mount...


>df -T /nfs
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
nfs1:/nfs
               nfs  
 5184863200 4845371648  76115680  99% /nfs

>pwd
/nfs
>gcc -m32 -Wall -O2 file.c -o file
>ls -hs file-0.txt
9.6G file-0.txt
>./file file-0.txt 

>
>gcc -m64 -Wall -O2 file.c -o file

>./file file-0.txt
>


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.


Thanks,
Brian












_______________________________________________
Gluster-users mailing list
Gluster-users at gluster.org
http://gluster.org/cgi-bin/mailman/listinfo/gluster-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-users/attachments/20111101/84ccf89e/attachment.html>


More information about the Gluster-users mailing list