Operating System - HP-UX
1753957 Members
7542 Online
108811 Solutions
New Discussion юеВ

cat:cannot write to output

 
sonysuper
New Member

cat:cannot write to output

iam trying to cat a file and append this content to other file. it is throwing the error:
error 0
cat:cannot write to output.
the file size is 2147483647 bytes and i have enough space on my disk.
im giving cat file1 >> file2 (note: file2 contains already some data)
8 REPLIES 8
Pete Randall
Outstanding Contributor

Re: cat:cannot write to output

Is "largefiles" on for the file system containing the output file?


Pete

Pete
Denver Osborn
Honored Contributor

Re: cat:cannot write to output

The user has write permission to file2 and does the filesystem support largefiles?

# /usr/sbin/fsadm /mount


-denver
spex
Honored Contributor

Re: cat:cannot write to output

Hi,

As was already mentioned, you likely do not have large file support enabled on the filesystem.

# umount /mountpoint

For vxfs:
# fsadm -F vxfs -o largefiles /dev/vgXX/rlvolY
For hfs:
# fsadm -F hfs -o largefiles /dev/vgXX/lvolY

# mount /mountpoint

PCS
spex
Honored Contributor

Re: cat:cannot write to output

Modify the appropriate line in /etc/fstab to make the change permanent.
sonysuper
New Member

Re: cat:cannot write to output

how to check whether i have largefile suppport? and one more thing is it is writing it to file2 and then failing...
but when i used to find difference i.e
diff file1 file2 it is giving
warning:new line not ended properly
(for 2 files.)and no issues with permissions.
V.Manoharan
Valued Contributor

Re: cat:cannot write to output

Hi sony,
you can check with fstyp command. f_flag 0 means no largefile support any value means largefile supporte is enabled.
#fstyp -v /dev/vg00/library

vxfs

version: 4

f_bsize: 8192

f_frsize: 1024

f_blocks: 106496

f_bfree: 79381

f_bavail: 74420

f_files: 19876

f_ffree: 19844

f_favail: 19844

f_fsid: 1073741836

f_basetype: vxfs

f_namemax: 254

f_magic: a501fcf5

f_featurebits: 0

f_flag: 0 ==>if it is zero, no large file support.other value represents largesupport.

f_fsindex: 7

f_size: 106496

To enable large filesupport
# umount /mountpoint
# fsadm -F vxfs -o largefiles /dev/vgXX/rlvolY
# mount /mountpoint


---------------------------------------
if online jfs installed your can use fsadm to check as well enable the largefile suppror.
fsadm -F vxfs /sapdata
nolargefiles
# fsadm -F vxfs -o largefiles /dev/vgXX/rlvolY



Regards
V.Manoharan
Andrew Merritt_2
Honored Contributor

Re: cat:cannot write to output

Yes, you have hit the 2Gb file size limit.

As well as the methods given above, the simplest way to enable large files is to use SAM. Select the filesystem, choose Modify, and click on the check box for "Allow Large Files". When you click OK, SAM will then unmount the filesystem, and remount it with the option enabled (so you will have to make sure the filesystem is not being used).

Andrew
spex
Honored Contributor

Re: cat:cannot write to output

Hi,

Another way to check if largefiles is enabled on the filesystem:

# grep '/mountpoint' /etc/fstab

or

# grep '/dev/vgxx/lvoly' /etc/fstab

Look for 'largefiles'.

This method is accurate as long as the filesystem wasn't manually mounted.

PCS