Operating System - HP-UX
1830214 Members
1606 Online
109999 Solutions
New Discussion

Cannot create a large file on 11.11 with large files enabled

 
SOLVED
Go to solution
crdavid67
Occasional Advisor

Cannot create a large file on 11.11 with large files enabled

I have a problem. System info: HP-UX 11.11, HFS or Veritas, large files enabled, mounted filesystem with largefiles option, running as root, ulimit files is unlimited, Dec 2003 Gold Patches.

Problem: I can not create a file larger than 2GB on either VxFS or HFS filesystems. Get a "File too large" error message. Has anyone had this problem?
11 REPLIES 11
Mel Burslan
Honored Contributor

Re: Cannot create a large file on 11.11 with large files enabled

the concept of creating files larger than 2GB in size usually requires use of an application. What are you trying to use ? Some common applications like tar (unpatched) has limitations inside their code.

also, you said you are running with largefiles enabled and mounted with this option, when you run

fsadm /filesystem

do you see it listed as largefiles enabled ?
________________________________
UNIX because I majored in cryptology...
A. Clay Stephenson
Acclaimed Contributor

Re: Cannot create a large file on 11.11 with large files enabled

The largefiles and nolargefiles mount option in no way shape or form enable or disable largefiles capability within a filesystem. You need to run fsadm to enable largefiles.

Even with largefiles actually enabled, the application may not be able to create or open files larger than 2GiB.
If it ain't broke, I can fix that.
Jonathan Fife
Honored Contributor

Re: Cannot create a large file on 11.11 with large files enabled

Maybe the command you're using doesn't support large files? How are you creating the file?

Can you do an fstyp -v /path/to/lvol just to verify large files are supported? f_flag should be set to 16 if so.
Decay is inherent in all compounded things. Strive on with diligence
crdavid67
Occasional Advisor

Re: Cannot create a large file on 11.11 with large files enabled

I've tried echo, which core dumped and cat, which gives the "File too large" error.

fsadm on the HFS reports:

# fsadm -F hfs /dev/vg01/rlvol5
file system : /dev/vg01/rlvol5
magic number : 5231994
feature bits : 3
file system supports : largefiles, longfilenames

fsadm on vxfs reports:

# fsadm -F vxfs /dev/vg05/rlvol1
largefiles

Patrick Wallek
Honored Contributor
Solution

Re: Cannot create a large file on 11.11 with large files enabled

Try the prealloc command.

# prealloc afile 2147483648

will attempt to create a file of exactly 2GB.

If you want to go a bit larger:

# prealloc afile 2200000000
crdavid67
Occasional Advisor

Re: Cannot create a large file on 11.11 with large files enabled

fstyp on HFS:

# fstyp -v /dev/vg01/rlvol5
hfs
f_bsize: 8192
f_frsize: 1024
f_blocks: 3005449
f_bfree: 907255
f_bavail: 606710
f_files: 492800
f_ffree: 492794
f_favail: 492794
f_fsid: 1073807365
f_basetype: hfs
f_namemax: 255
f_magic: 5231994
f_featurebits: 3
f_flag: 16
f_fsindex: 0
f_size: 3072000

On VxFS:

# fstyp -v /dev/vg05/rlvol1
vxfs
version: 4
f_bsize: 8192
f_frsize: 8192
f_blocks: 24576000
f_bfree: 11914224
f_bavail: 11821145
f_files: 3971040
f_ffree: 2978528
f_favail: 2978528
f_fsid: 1074069505
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 16
f_fsindex: 8
f_size: 24576000
crdavid67
Occasional Advisor

Re: Cannot create a large file on 11.11 with large files enabled

prealloc did work on the VxFS filesystem and the HFS filesystem, although VxFS was much much faster :)

I'll have to check the utility the users is using to create these files.

Should cat and echo be able to work with large files or do I need newer versions of those?

Thanks for the information.
IT_2007
Honored Contributor

Re: Cannot create a large file on 11.11 with large files enabled

Try to remount filesystem with " -o largefiles" so that it will work for more than 2GB files.
rariasn
Honored Contributor

Re: Cannot create a large file on 11.11 with large files enabled

- Umount FS and mount with "largefile" option.

If necesary, modify /etc/fstab:

dev/vgxx/lvxxxx/opt/xxxxxxx vxfs delaylog,largefiles 0 2

Rgs,

ran
crdavid67
Occasional Advisor

Re: Cannot create a large file on 11.11 with large files enabled

Thanks for all the replies, the filesystems were/are mounted with large files and were created with the same.

The issue was/is 32 bit apps that could not write past the 2GB limit.

bash, cat, echo, etc.

Thanks again for all your help.
crdavid67
Occasional Advisor

Re: Cannot create a large file on 11.11 with large files enabled

Use large file enabled apps.