RE: cannot lseek
Pamarthi Prasad <[email protected]> Thu, 21 Aug 2003 06:23:01 +0200
| Newsgroups | gmane.linux.redhat.release.enigma |
|---|---|
| Message-ID | <[email protected]> |
Yes. I am running 32 bit ver. only. But I could able to copy >2GB files from NFS mounted file systems to local file system. It is giving this error only when I copy to NFS file system. Regards, Prasad -----Original Message----- From: Kenneth Goodwin [mailto:[email protected]] Sent: Thursday, August 21, 2003 5:14 AM To: [email protected] Subject: RE: cannot lseek Your answer is - you are running on a 32 bit version of the kernel File sizes are usually limited to 2GB unless you have special 64 bit file IO routines, arithmetic, and Inodes hacked into the kernel. lseek(fildes, offset, whence); On a 32bit system, lseek offsets are 32 bit signed long integers 1 bit to indicate numeric sign (+/-) and 31 bits carrying the value. The sign bit (bit 31 base 0) is used for forward/backward seek control especially in relative and end of file based seeks (whence flag) 2 raised to the power of 31 is 2,147,483,648 (2GB) which is the maximum file size. You want bigger files, move to a full 64 bit kernel which may or may not run on 32 bit hardware. Depends on whether they added in the assembler code to handle 64 bit arithmetic on a 32 bit machine using 32 bit integers. Hint - unsigned long double_long_integer[2]; a[0] is treated as a signed 32 bit integer, a[1] is treated as a unsigned 32 bit integer and then you manage the carry forward's/backward's between the two halves when doing math operations. > > > do you currently have any files on your system over 2GB? My > mail files will not > cross 2GB. Found out hard way. > > Pamarthi Prasad wrote: > > Hi All, > > > > I am getting "cp: cannot lseek " error while copying a > file of size > > around 3 GB over NFS. It gives this error and stops > copying the file > > after copying only 2 GB. Both NFS server and client > are running > > with*** NFS ver.3*. > > > > Can somebody give me a hint...? > > > > TIA > > > > Regards, > > > > Prasad > > > > > > > > > ************************************************************ * > ********* > > The information in this message is confidential and may be legally > > privileged. It is intended solely for the addressee. > Access to this message > > by anyone else is unauthorized. If you are not the > intended recipient, any > > disclosure, copying, or distribution of the message, or > any action or > > omission taken by you in reliance on it, is prohibited and > may be unlawful. > > Please immediately contact the sender if you have received > this message in > > error. > > > > > ************************************************************ * > ********* > > > _______________________________________________ > enigma-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/enigma-list > _______________________________________________ enigma-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/enigma-list ********************************************************************** The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. **********************************************************************