Operating System - HP-UX
1835994 Members
2201 Online
110088 Solutions
New Discussion

cp does not work with files > 2G

 
Scott Howell
Occasional Advisor

cp does not work with files > 2G

I have an L2000 server and am trying to copy a 4GB file. When I ran cp I got a 'file to large' error. The fs I am copying it to DOES have Large File system support turned on. I have resorted to dd which is very slow, but works on large files. Is there any way i can get cp to work on large files.
5 REPLIES 5
Rita C Workman
Honored Contributor

Re: cp does not work with files > 2G

Well if largefiles is set for the file system then one issue is answered.
What I am thinking is that your problem may be related to a process or user. I would check and see if ulimit or disk quota has been set so that a user or process is not able to run cp on a file this large.
Check 'man ulimit' and maybe 'man quota'.

Hope this helps,
/rcw
Bill Hassell
Honored Contributor

Re: cp does not work with files > 2G

cp is OK for large files. As Rita mentioned, this may be a ulimit issue but the only man page for ulimit is for section 2 (programming interface). Use the ulimit -a command (assuming you haven't change to a lower capability like ksh or some other shell) and check on fileblocks (must be unlimited).


Bill Hassell, sysadmin
Scott Howell
Occasional Advisor

Re: cp does not work with files > 2G

The user doing the copying using cp is oracle. I did an uname -a and this is what I got. It seems it should be set. I'll try copying again to see what happens.
$ ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 512
Scott Howell
Occasional Advisor

Re: cp does not work with files > 2G

I got it to work. I thought i did have LF support on the file system.
Bruce Regittko_1
Esteemed Contributor

Re: cp does not work with files > 2G

Hi,

I'm glad you got it working. In the future, if this happens again, you might consider using ftp rather than dd to transfer your large files. Just

ftp $( hostname )

and login.

--Bruce
www.stratech.com/training