Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

largefile support

by Anonymous Monk
on May 08, 2000 at 03:23 UTC ( [id://10545]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm running perl 5.005_03 on Solaris 2.6. I need to be able to interact with files larger than 2gb. Solaris supports this, but perl doesn't seem to. Am I missing something or is largefile support simply missing from perl

Replies are listed 'Best First'.
Re: largefile support
by reptile (Monk) on May 08, 2000 at 03:52 UTC

    If at all possible, you might want to get perl5.6. From here:

    Similarly, Perl can now process files larger than 2 gigabytes on computers that support them. Just add -Duselargefiles to your Configure, and off you go.

    I assume this means that everything pre 5.6 could not handle >2gb files.

    72656B636148206C72655020726568746F6E41207473754A

Re: largefile support
by BBQ (Curate) on May 08, 2000 at 03:44 UTC
    There is a bug report regarding files greater that 2Gb on the perl5_porter's mailing list. Apparently it applies to most 64bit systems that have large file support (and that includes Solaris 2.6). You can check it out for yourself.

    A snippet from the report says:
    ... The size returned by lstat is incorrect for files over 2 GB for perl 5.004_04 and earlier versions. I see this under Solaris 2.6 and IRIX 6.2 ...

    I would imagine that a likely solution would be to work with perl above 5.004_04, but you already stated that you're working with 5.005_03, so I really don't know what to gather from this.
    HTH

    #!/home/bbq/bin/perl
    # Trust no1!
Re: largefile support
by plaid (Chaplain) on May 08, 2000 at 03:44 UTC
    I don't mean to sound condescending at all here, so please don't take it as such. Are you sure the Solaris machine you are running can support > 2gb files? I know in general Solaris can support files over that size, but I ran into an old machine running Solaris 2.6, which have absolutely no knowledge of the installation procedures used, and it could only support files up to 2gb. If you haven't, I'd suggest doing a simple 'dd' test to check for certain what the max file size is. Nothing but the kernel should ever have to know what this number is. All compilers and interpreters just use the underlying kernel methods for reading and writing to files, so it really shouldn't affect anything (unless something weird were done, like bringing over the binary from somewhere else).
      Yes. Solaris 2.6 (with reasonable kernel revisions) supports largefiles. You simply have to mount your file system -o largefiles.
RE: largefile support
by Jonathan (Curate) on May 08, 2000 at 19:59 UTC
    Further to the excellent help above it might also be worth looking at the /etc/mnttab file. This will confirm that the largefiles option has been used when creating your file systems. (The third field's options includes largefiles/nolargefiles)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://10545]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-18 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found