Operating System - HP-UX
1833995 Members
2645 Online
110063 Solutions
New Discussion

TAR cannot create file >2GB in background

 
Leon_17
Occasional Advisor

TAR cannot create file >2GB in background

Hi,
I get the following errors with tar, cpio and pax can someone please help?

1. With TAR:
CMD: tar cvf backup.tar /backup
ERROR: Can't open /dev/tty to prompt for more media.

2. With CPIO:
CMD: find /backup -depth -print | cpio -ov >backup.cpio
ERROR: write failed: File too large
Can't open /dev/tty.

3. With PAX:
CMD: pax -w -f backup.pax /backup
ERROR: pax: write : File too large
pax: A write error has occurred.

All of these commands run if I run them normally, but if I run them in the background or from cron, I get the errors. The size of the file it creates is 2147483136.
Thanks
Leon
4 REPLIES 4
Frank Slootweg
Honored Contributor

Re: TAR cannot create file >2GB in background

Probably the ulimit settings are different.

ulimit can be tricky because it depends on things like cron, the shell used, etc..

I advise to put these commands in a script and put a ulimit command just before each (tar/cpio/pax) command in the script and look *very precisely* at what ulimit reports in each case.
Colin Topliss
Esteemed Contributor

Re: TAR cannot create file >2GB in background

I can't see this behaviour under 11i.

Can you please confirm the version of the OS you are running.

I tried:
tar -cvf backup.tar /backup &
nohup tar -cvf backup.tar /backup &

As I ran this as root, ulimit is unlimited - are you running this as root?
Michael Steele_2
Honored Contributor

Re: TAR cannot create file >2GB in background

Two gb has been the ceiling for quit awhile now. To get around it GNU Tar was created. In HP-UX fbackup also works:

cd /dir
fbackup -i /tmp/source -f - | frecover -x -X -f - (* between filesystems *)

Here's a link for GNU Tar:

www.gnu.org/directory/tar.html
Support Fatherhood - Stop Family Law
Frank Slootweg
Honored Contributor

Re: TAR cannot create file >2GB in background

This is a duplicate thread. Sigh!

Let us close this one because the other one has the most responses:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x944c28c64656d71190080090279cd0f9,00.html