Hi, I recently became aware (the hard way) about a kernel limitation in 2.4.x that prevents a linux client from reading files larger than 2GB from a SMB filesystem. The situation is that our AMD64 Linux server, running SuSE 9.0, (kernel 2.4.21-171-smp, samba-2.2.8a-108) is serving files to windows and linux machines. I have successfully created and read files over 12GB in size from a dual opteron machine running Windows Server 2003 beta for x86-64. The linux machine (dual Xeon, SuSE9.0 for x86, kernel 2.4.21-166-smp, samba-2.2.8a-107) fails to read files over 2GB from the same server. According to the Samba lists, this is not due to limitations of Samba 2.x, but rather it is a limit in smbfs in the 2.4 kernel, and there are patches available to overcome it (smbfs-2.4.xx-lfs.patch). Has this issue been resolved in the 2.6 kernel? If so, then I will simply upgrade to SuSE 9.1. If not, I may have to rebuild my kernels. Do you know where I can find a patch for current SuSE kernels? Thanks, John Craig
Hi John, Isn't the 2G limit just a fact of life with the 32 bit version of Linux that your Xenon is running? For example, you wont be able to use tar to create an archive over 2G on that Xenon box either, not even on its local disk. I specifically tested files > 4G could be created from Windows XP via Samba running on Linux Suse 9.0 64 bit when I first evaluated that OS. Regards, Jeremy. On Thursday 29 Apr 2004 18:12, John Craig wrote:
Hi,
I recently became aware (the hard way) about a kernel limitation in 2.4.x that prevents a linux client from reading files larger than 2GB from a SMB filesystem. The situation is that our AMD64 Linux server, running SuSE 9.0, (kernel 2.4.21-171-smp, samba-2.2.8a-108) is serving files to windows and linux machines. I have successfully created and read files over 12GB in size from a dual opteron machine running Windows Server 2003 beta for x86-64. The linux machine (dual Xeon, SuSE9.0 for x86, kernel 2.4.21-166-smp, samba-2.2.8a-107) fails to read files over 2GB from the same server.
According to the Samba lists, this is not due to limitations of Samba 2.x, but rather it is a limit in smbfs in the 2.4 kernel, and there are patches available to overcome it (smbfs-2.4.xx-lfs.patch). Has this issue been resolved in the 2.6 kernel? If so, then I will simply upgrade to SuSE 9.1. If not, I may have to rebuild my kernels. Do you know where I can find a patch for current SuSE kernels?
Thanks, John Craig
Hi, According to what I have been able to glean from googling, most of the file systems in 2.4.x and higher kernels on 32 bit x86 systems are compatible with files > 2 GB, and also glibc and various utilities have been updated to accommodate them as well. I don't know about your version of tar, that may be incompatible. However, smbfs is still not compatible, even though some patches have been developed for it. I noticed that Marcello Tosatti rejected a patch for smbfs in the 2.4 kernel on the grounds that it breaks compatibility with some programs. I tested the 2.6 kernel in the SuSE 9.1 live eval CD, and it also does not support large files with smbfs. So the solution on the file server is to export the same data as both smb and nfs shares, and mount the data as nfs on the Linux clients. I am trying that now with a 2.4 kernel, and it works. I made sure the unix user exists on both the file server and the linux client with the same uid number, and the windows clients also connect with the same user name, so all are in agreement. Cheers, John Craig jeremy@saros.co.uk wrote:
Hi John,
Isn't the 2G limit just a fact of life with the 32 bit version of Linux that your Xenon is running? For example, you wont be able to use tar to create an archive over 2G on that Xenon box either, not even on its local disk.
I specifically tested files > 4G could be created from Windows XP via Samba running on Linux Suse 9.0 64 bit when I first evaluated that OS.
Regards,
Jeremy.
On Thursday 29 Apr 2004 18:12, John Craig wrote:
Hi,
I recently became aware (the hard way) about a kernel limitation in 2.4.x that prevents a linux client from reading files larger than 2GB from a SMB filesystem. The situation is that our AMD64 Linux server, running SuSE 9.0, (kernel 2.4.21-171-smp, samba-2.2.8a-108) is serving files to windows and linux machines. I have successfully created and read files over 12GB in size from a dual opteron machine running Windows Server 2003 beta for x86-64. The linux machine (dual Xeon, SuSE9.0 for x86, kernel 2.4.21-166-smp, samba-2.2.8a-107) fails to read files over 2GB from the same server.
According to the Samba lists, this is not due to limitations of Samba 2.x, but rather it is a limit in smbfs in the 2.4 kernel, and there are patches available to overcome it (smbfs-2.4.xx-lfs.patch). Has this issue been resolved in the 2.6 kernel? If so, then I will simply upgrade to SuSE 9.1. If not, I may have to rebuild my kernels. Do you know where I can find a patch for current SuSE kernels?
Thanks, John Craig
This is interesting. The usual file handling calls in C are defined like this: size_t fread(void *ptr, size_t size, size_t nmemb, FILE int fseek(FILE *stream, long offset, int whence); *stream); and running this program #include <stdio.h> int main (char **argv, int argc) { printf("Size of size_t is %d bytes\n",sizeof(size_t)); printf("Size of long is %d bytes\n",sizeof(long)); } on Suse 9.0 with the 2.4.21-201-smp kernel returns Size of size_t is 8 bytes Size of long is 8 bytes So life is good here, we can read/seek at least 2**63 bytes. On Mandrake 10.0 running the 2.6.3 kernel, the same program prints Size of size_t is 4 bytes Size of long is 4 bytes Suggesting seek can travel only 2G through a file, and read/write operations can handle 2G or at most 4G of data. That being the case, does anyone know how handling files over 2G on 32 bit Linux might work? Regards, Jeremy. On Tuesday 04 May 2004 17:04, John Craig wrote:
Hi,
According to what I have been able to glean from googling, most of the file systems in 2.4.x and higher kernels on 32 bit x86 systems are compatible with files > 2 GB, and also glibc and various utilities have been updated to accommodate them as well. I don't know about your version of tar, that may be incompatible. However, smbfs is still not compatible, even though some patches have been developed for it. I noticed that Marcello Tosatti rejected a patch for smbfs in the 2.4 kernel on the grounds that it breaks compatibility with some programs. I tested the 2.6 kernel in the SuSE 9.1 live eval CD, and it also does not support large files with smbfs.
So the solution on the file server is to export the same data as both smb and nfs shares, and mount the data as nfs on the Linux clients. I am trying that now with a 2.4 kernel, and it works. I made sure the unix user exists on both the file server and the linux client with the same uid number, and the windows clients also connect with the same user name, so all are in agreement.
Cheers,
John Craig
jeremy@saros.co.uk wrote:
Hi John,
Isn't the 2G limit just a fact of life with the 32 bit version of Linux that your Xenon is running? For example, you wont be able to use tar to create an archive over 2G on that Xenon box either, not even on its local disk.
I specifically tested files > 4G could be created from Windows XP via Samba running on Linux Suse 9.0 64 bit when I first evaluated that OS.
Regards,
Jeremy.
On Thursday 29 Apr 2004 18:12, John Craig wrote:
Hi,
I recently became aware (the hard way) about a kernel limitation in 2.4.x that prevents a linux client from reading files larger than 2GB from a SMB filesystem. The situation is that our AMD64 Linux server, running SuSE 9.0, (kernel 2.4.21-171-smp, samba-2.2.8a-108) is serving files to windows and linux machines. I have successfully created and read files over 12GB in size from a dual opteron machine running Windows Server 2003 beta for x86-64. The linux machine (dual Xeon, SuSE9.0 for x86, kernel 2.4.21-166-smp, samba-2.2.8a-107) fails to read files over 2GB from the same server.
According to the Samba lists, this is not due to limitations of Samba 2.x, but rather it is a limit in smbfs in the 2.4 kernel, and there are patches available to overcome it (smbfs-2.4.xx-lfs.patch). Has this issue been resolved in the 2.6 kernel? If so, then I will simply upgrade to SuSE 9.1. If not, I may have to rebuild my kernels. Do you know where I can find a patch for current SuSE kernels?
Thanks, John Craig
-- Jeremy Sonander. Saros Technology Limited. The Nexus Building, Broadway, Letchworth, SG6 3TA. Tel 01491 837787, Fax 01491 837477. For Support email support@saros.co.uk
participants (2)
-
Jeremy Sonander
-
John Craig